-
Notifications
You must be signed in to change notification settings - Fork 506
Add tests for resolution order of async modules promises #4591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for resolution order of async modules promises #4591
Conversation
| Promise.all([pA_start.promise, pB_start.promise]).then(p1.reject); | ||
|
|
||
| importsP.then(() => { | ||
| assert.compareArray(logs, ["B", "A"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the normative change, this would be A,B.
18d23ef to
644a304
Compare
|
Mhhh there might be something wrong with the test, I was expecting V8 and SM to fail it. |
644a304 to
697229d
Compare
|
Results are (almost) as expected:
|
…der r=jonco This patch inverts the order in which we reject promises in AsyncModuleExecutionRejected to match AsyncModuleExecutionFulfilled: first the promise corresponding to the leaf module (the one that throws) is rejected, and then its ancestors. This change was discussed at the July 2025 TC39 meeting. Spec PR: tc39/ecma262#3695 test262: tc39/test262#4591 Differential Revision: https://phabricator.services.mozilla.com/D267210
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
…der r=jonco This patch inverts the order in which we reject promises in AsyncModuleExecutionRejected to match AsyncModuleExecutionFulfilled: first the promise corresponding to the leaf module (the one that throws) is rejected, and then its ancestors. This change was discussed at the July 2025 TC39 meeting. Spec PR: tc39/ecma262#3695 test262: tc39/test262#4591 Differential Revision: https://phabricator.services.mozilla.com/D267210
…der r=jonco This patch inverts the order in which we reject promises in AsyncModuleExecutionRejected to match AsyncModuleExecutionFulfilled: first the promise corresponding to the leaf module (the one that throws) is rejected, and then its ancestors. This change was discussed at the July 2025 TC39 meeting. Spec PR: tc39/ecma262#3695 test262: tc39/test262#4591 Differential Revision: https://phabricator.services.mozilla.com/D267210 UltraBlame original commit: a3cf4d1eef17209c4c4194e07f38fe870c417781
…der r=jonco This patch inverts the order in which we reject promises in AsyncModuleExecutionRejected to match AsyncModuleExecutionFulfilled: first the promise corresponding to the leaf module (the one that throws) is rejected, and then its ancestors. This change was discussed at the July 2025 TC39 meeting. Spec PR: tc39/ecma262#3695 test262: tc39/test262#4591 Differential Revision: https://phabricator.services.mozilla.com/D267210 UltraBlame original commit: a3cf4d1eef17209c4c4194e07f38fe870c417781
…der r=jonco This patch inverts the order in which we reject promises in AsyncModuleExecutionRejected to match AsyncModuleExecutionFulfilled: first the promise corresponding to the leaf module (the one that throws) is rejected, and then its ancestors. This change was discussed at the July 2025 TC39 meeting. Spec PR: tc39/ecma262#3695 test262: tc39/test262#4591 Differential Revision: https://phabricator.services.mozilla.com/D267210 UltraBlame original commit: a3cf4d1eef17209c4c4194e07f38fe870c417781
Co-authored-by: Ms2ger <[email protected]>
58e2e96 to
314fd06
Compare
Tests for tc39/ecma262#3695