-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Normative: Promise.{all,allSettled,race} should check resolve is a function before opening their iterable #1912
Normative: Promise.{all,allSettled,race} should check resolve is a function before opening their iterable #1912
Conversation
…romise combinators. r=arai Apply the updates from <tc39/ecma262#1912>. Differential Revision: https://phabricator.services.mozilla.com/D77838
…romise combinators. r=arai Apply the updates from <tc39/ecma262#1912>. Differential Revision: https://phabricator.services.mozilla.com/D77838
Per TC39 consensus on tc39/ecma262#1912.
54602e3
to
abc3c32
Compare
Looks, like @shvaikalesh graciously updated test262 for me with tc39/test262#2648. (Thanks!) I rebased against the current spec and fixed my summaries to match the newer style. I noticed that we use the phrasing |
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.
lgtm
Promise.{all,allSettled,any,race} should check resolve is a function before opening their iteratable. PR: tc39/ecma262#1912 PR for Promise.any: tc39/proposal-promise-any#65 This CL includes the following cleanup changes: - Made it more explicit that the constructor is a Constructor. - Removed unnecessary nested try blocks (a try can have both a catch and a label). - Moved commonly used definitions out of promise-race.tq where they don't belong. - Made the parameter order of PerformPromiseAll match the spec. Bug: v8:10578 Change-Id: I9deb5d5106db7350a0d0ad52f165ff2469e7074b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232544 Commit-Queue: Marja Hölttä <[email protected]> Reviewed-by: Igor Sheludko <[email protected]> Reviewed-by: Shu-yu Guo <[email protected]> Cr-Commit-Position: refs/heads/master@{#68260}
dc589fa
to
6ca6f94
Compare
6ca6f94
to
855093b
Compare
This change makes promise.{all,allSettled,race} behave more like a canonical JS implementation. In particular, the resolve property is now checked to be callable before beginning iteration on the first argument.
Closes #1902.