]> git.kaiwu.me - quickjs.git/commitdiff
Reverse e140122202cc24728b394f8f90fa2f4a2d7c397e
authorCharlie Gordon <github@chqrlie.org>
Tue, 13 Feb 2024 08:45:58 +0000 (09:45 +0100)
committerCharlie Gordon <github@chqrlie.org>
Tue, 13 Feb 2024 08:45:58 +0000 (09:45 +0100)
- remove temporary fix for MemorySanitizer:
  setting p->u.array.count to 0 silenced a warning in JS_GetPropertyValue on a
  hacky test agains the length of fast_array object.
  This hack was removed by commit c3635861f63931255c7a953bccbb0e2e90cc75aa.

quickjs.c

index 223be7b3ed585c5605cbe9f3ce9c69e872060b0e..ec24a56656421a5e4b31e7c8b7a7c03f9ba5affb 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -14774,8 +14774,6 @@ static JSValue js_build_mapped_arguments(JSContext *ctx, int argc,
     if (JS_IsException(val))
         return val;
     p = JS_VALUE_GET_OBJ(val);
-    p->u.array.u.values = NULL;
-    p->u.array.count = 0;
 
     /* add the length field (cannot fail) */
     pr = add_property(ctx, p, JS_ATOM_length,