diff --git a/source/qjs_wota.c b/source/qjs_wota.c index 9b2a4b1e..d9520c1c 100644 --- a/source/qjs_wota.c +++ b/source/qjs_wota.c @@ -128,8 +128,7 @@ static void wota_encode_value(WotaEncodeContext *enc, JSValueConst val, JSValueC wota_write_int_word(&enc->wb, d); break; } - case JS_TAG_FLOAT64: - case JS_TAG_BIG_INT: { + case JS_TAG_FLOAT64: { double d; if (JS_ToFloat64(ctx, &d, replaced) < 0) { wota_write_sym(&enc->wb, WOTA_NULL); diff --git a/source/quickjs.c b/source/quickjs.c index b193ad5c..9f606b54 100644 --- a/source/quickjs.c +++ b/source/quickjs.c @@ -5389,6 +5389,7 @@ static void gc_free_cycles(JSRuntime *rt) switch(p->gc_obj_type) { case JS_GC_OBJ_TYPE_JS_OBJECT: case JS_GC_OBJ_TYPE_FUNCTION_BYTECODE: + case JS_GC_OBJ_TYPE_ARRAY: #ifdef DUMP_GC_FREE if (!header_done) { printf("Freeing cycles:\n"); @@ -6902,11 +6903,13 @@ static int JS_SetPropertyValue(JSContext *ctx, JSValueConst this_obj, JSValue pr JSArray *arr = JS_VALUE_GET_ARRAY(this_obj); int32_t signed_idx = JS_VALUE_GET_INT(prop); if (signed_idx < 0) { + JS_FreeValue(ctx, prop); JS_FreeValue(ctx, val); JS_ThrowRangeError(ctx, "array index %d out of bounds (length %u)", signed_idx, arr->len); return -1; } + JS_FreeValue(ctx,prop); return js_intrinsic_array_set(ctx, arr, (uint32_t)signed_idx, val); } @@ -10465,7 +10468,7 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj, goto exception; call_argv = sp - call_argc; for (i = 0; i < call_argc; i++) { - JS_SetPropertyNumber(ctx, ret_val, i, call_argv[i]); + ret = JS_SetPropertyNumber(ctx, ret_val, i, call_argv[i]); call_argv[i] = JS_NULL; if (ret < 0) { JS_FreeValue(ctx, ret_val); diff --git a/source/quickjs.h b/source/quickjs.h index 7148b368..7ffec94d 100644 --- a/source/quickjs.h +++ b/source/quickjs.h @@ -75,7 +75,6 @@ typedef uint32_t JSAtom; enum { /* all tags with a reference count are negative */ JS_TAG_FIRST = -10, /* first negative tag */ - JS_TAG_BIG_INT = -10, JS_TAG_SYMBOL = -9, JS_TAG_STRING = -8, JS_TAG_STRING_ROPE = -7,