changed module rejection order according to spec change

This commit is contained in:
Fabrice Bellard
2025-10-18 10:50:51 +02:00
parent 9a421b3338
commit af16a97921
2 changed files with 8 additions and 9 deletions

View File

@@ -30249,14 +30249,6 @@ static JSValue js_async_module_execution_rejected(JSContext *ctx, JSValueConst t
module->status = JS_MODULE_STATUS_EVALUATED; module->status = JS_MODULE_STATUS_EVALUATED;
module->async_evaluation = FALSE; module->async_evaluation = FALSE;
for(i = 0; i < module->async_parent_modules_count; i++) {
JSModuleDef *m = module->async_parent_modules[i];
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED, 1, &error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
}
if (!JS_IsUndefined(module->promise)) { if (!JS_IsUndefined(module->promise)) {
JSValue ret_val; JSValue ret_val;
assert(module->cycle_root == module); assert(module->cycle_root == module);
@@ -30264,6 +30256,14 @@ static JSValue js_async_module_execution_rejected(JSContext *ctx, JSValueConst t
1, &error); 1, &error);
JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, ret_val);
} }
for(i = 0; i < module->async_parent_modules_count; i++) {
JSModuleDef *m = module->async_parent_modules[i];
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED, 1, &error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
}
return JS_UNDEFINED; return JS_UNDEFINED;
} }

View File

@@ -6,7 +6,6 @@ test262/test/annexB/language/expressions/assignmenttargettype/callexpression-in-
test262/test/annexB/language/expressions/assignmenttargettype/callexpression.js:33: SyntaxError: invalid assignment left-hand side test262/test/annexB/language/expressions/assignmenttargettype/callexpression.js:33: SyntaxError: invalid assignment left-hand side
test262/test/annexB/language/expressions/assignmenttargettype/cover-callexpression-and-asyncarrowhead.js:20: SyntaxError: invalid assignment left-hand side test262/test/annexB/language/expressions/assignmenttargettype/cover-callexpression-and-asyncarrowhead.js:20: SyntaxError: invalid assignment left-hand side
test262/test/language/identifier-resolution/assign-to-global-undefined.js:20: strict mode: expected error test262/test/language/identifier-resolution/assign-to-global-undefined.js:20: strict mode: expected error
test262/test/language/module-code/top-level-await/rejection-order.js:20: TypeError: $DONE() not called
test262/test/staging/sm/Function/arguments-parameter-shadowing.js:14: Test262Error: Expected SameValue(«true», «false») to be true test262/test/staging/sm/Function/arguments-parameter-shadowing.js:14: Test262Error: Expected SameValue(«true», «false») to be true
test262/test/staging/sm/Function/constructor-binding.js:11: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true test262/test/staging/sm/Function/constructor-binding.js:11: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true
test262/test/staging/sm/Function/constructor-binding.js:11: strict mode: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true test262/test/staging/sm/Function/constructor-binding.js:11: strict mode: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true