Skip to content

Commit 35efa24

Browse files
committed
fixup!
1 parent 1aa580b commit 35efa24

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

quickjs.c

+6-7
Original file line numberDiff line numberDiff line change
@@ -50916,8 +50916,11 @@ static void js_finrec_finalizer(JSRuntime *rt, JSValue val)
5091650916
struct list_head *el, *el1;
5091750917
list_for_each_safe(el, el1, &frd->entries) {
5091850918
JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link);
50919-
list_del(&fre->link);
5092050919
delete_finrec_weakref(rt, fre);
50920+
}
50921+
list_for_each_safe(el, el1, &frd->entries) {
50922+
JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link);
50923+
list_del(&fre->link);
5092150924
JS_FreeValueRT(rt, fre->held_val);
5092250925
JS_FreeValueRT(rt, fre->token);
5092350926
js_free_rt(rt, fre);
@@ -50981,12 +50984,8 @@ static JSValue js_finrec_register(JSContext *ctx, JSValueConst this_val, int arg
5098150984
return JS_UNDEFINED;
5098250985
if (!JS_IsUndefined(held_val) && js_same_value(ctx, target, held_val))
5098350986
return JS_ThrowTypeError(ctx, "held value cannot be the target");
50984-
if (!JS_IsUndefined(token)) {
50985-
if (!is_valid_weakref_target(token))
50986-
return JS_ThrowTypeError(ctx, "invalid unregister token");
50987-
if (js_same_value(ctx, target, token))
50988-
return JS_ThrowTypeError(ctx, "token cannot be the target");
50989-
}
50987+
if (!JS_IsUndefined(token) && !is_valid_weakref_target(token))
50988+
return JS_ThrowTypeError(ctx, "invalid unregister token");
5099050989

5099150990
JSFinRecEntry *fre = js_malloc(ctx, sizeof(*fre));
5099250991
if (!fre)

test262_errors.txt

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
test262/test/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js:13: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all
22
test262/test/built-ins/AsyncGeneratorPrototype/return/return-suspendedYield-broken-promise-try-catch.js:39: TypeError: $DONE() not called
33
test262/test/built-ins/AsyncGeneratorPrototype/return/return-suspendedYield-broken-promise-try-catch.js:39: strict mode: TypeError: $DONE() not called
4-
test262/test/built-ins/FinalizationRegistry/prototype/register/return-undefined-register-object.js:36: TypeError: token cannot be the target
5-
test262/test/built-ins/FinalizationRegistry/prototype/register/return-undefined-register-object.js:36: strict mode: TypeError: token cannot be the target
6-
test262/test/built-ins/FinalizationRegistry/prototype/register/return-undefined-register-symbol.js:40: TypeError: token cannot be the target
7-
test262/test/built-ins/FinalizationRegistry/prototype/register/return-undefined-register-symbol.js:40: strict mode: TypeError: token cannot be the target
8-
test262/test/built-ins/FinalizationRegistry/prototype/register/unregisterToken-same-as-target.js:26: TypeError: token cannot be the target
9-
test262/test/built-ins/FinalizationRegistry/prototype/register/unregisterToken-same-as-target.js:26: strict mode: TypeError: token cannot be the target
104
test262/test/built-ins/RegExp/lookahead-quantifier-match-groups.js:27: Test262Error: Expected [a, abc] and [a, undefined] to have the same contents. ? quantifier
115
test262/test/built-ins/RegExp/lookahead-quantifier-match-groups.js:27: strict mode: Test262Error: Expected [a, abc] and [a, undefined] to have the same contents. ? quantifier
126
test262/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-no-throw.js:30: TypeError: out-of-bound numeric index (Testing with Float64Array.)

0 commit comments

Comments
 (0)