Skip to content
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

[Idea] Avoid redundant HostPromiseRejectionTrackerEvents #1092

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -37304,7 +37304,6 @@ <h1>RejectPromise ( _promise_, _reason_ )</h1>
1. Set _promise_.[[PromiseFulfillReactions]] to *undefined*.
1. Set _promise_.[[PromiseRejectReactions]] to *undefined*.
1. Set _promise_.[[PromiseState]] to `"rejected"`.
1. If _promise_.[[PromiseIsHandled]] is *false*, perform HostPromiseRejectionTracker(_promise_, `"reject"`).
1. Return TriggerPromiseReactions(_reactions_, _reason_).
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -37361,6 +37360,7 @@ <h1>PromiseReactionJob ( _reaction_, _argument_ )</h1>
1. If _type_ is `"Fulfill"`, let _handlerResult_ be NormalCompletion(_argument_).
1. Else,
1. Assert: _type_ is `"Reject"`.
1. If _promise_.[[PromiseIsHandled]] is *false*, perform HostPromiseRejectionTracker(_promise_, `"reject"`).
1. Let _handlerResult_ be Completion {[[Type]]: ~throw~, [[Value]]: _argument_, [[Target]]: ~empty~}.
1. Else, let _handlerResult_ be Call(_handler_, *undefined*, &laquo; _argument_ &raquo;).
1. If _handlerResult_ is an abrupt completion, then
Expand Down Expand Up @@ -37734,7 +37734,6 @@ <h1>PerformPromiseThen ( _promise_, _onFulfilled_, _onRejected_, _resultCapabili
1. Else,
1. Assert: The value of _promise_.[[PromiseState]] is `"rejected"`.
1. Let _reason_ be _promise_.[[PromiseResult]].
1. If _promise_.[[PromiseIsHandled]] is *false*, perform HostPromiseRejectionTracker(_promise_, `"handle"`).
1. Perform EnqueueJob(`"PromiseJobs"`, PromiseReactionJob, &laquo; _rejectReaction_, _reason_ &raquo;).
1. Set _promise_.[[PromiseIsHandled]] to *true*.
1. Return _resultCapability_.[[Promise]].
Expand Down