Closed
Bug 1474348
Opened 6 years ago
Closed 6 years ago
Fix two spec compliance bugs in the BlockOnPromise fast path
Categories
(Core :: JavaScript: Standard Library, enhancement)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(2 files)
13.18 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
10.49 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
This fast path [1] needs to check that the onFulfilled function doesn't return an object and that the |blockedPromise| doesn't have the PROMISE_FLAG_DEFAULT_RESOLVING_FUNCTIONS (PROMISE_FLAG_DEFAULT_RESOLVE_FUNCTION / PROMISE_FLAG_DEFAULT_REJECT_FUNCTION) flag set. [1] https://searchfox.org/mozilla-central/rev/28daa2806c89684b3dfa4f0b551db1d099dda7c2/js/src/builtin/Promise.cpp#3315-3316
Assignee | ||
Comment 1•6 years ago
|
||
Adds some additional accessor methods to the PromiseObject class and combines the PROMISE_FLAG_DEFAULT_RESOLVE_FUNCTION and PROMISE_FLAG_DEFAULT_REJECT_FUNCTION into a single PROMISE_FLAG_DEFAULT_RESOLVING_FUNCTIONS flag to avoid giving the impression that it is possible to have only one default resolving function.
Attachment #8990761 -
Flags: review?(arai.unmht)
Assignee | ||
Comment 2•6 years ago
|
||
Fixes the two bugs by ensuring that |onFulfilled| doesn't return an object and the blocked promise doesn't have the PROMISE_FLAG_DEFAULT_RESOLVING_FUNCTIONS flag set. Sorry for the convoluted test cases, it seems like both bugs require a rather complex set-up to get triggered.
Attachment #8990763 -
Flags: review?(arai.unmht)
Comment 3•6 years ago
|
||
Comment on attachment 8990761 [details] [diff] [review] bug1474348-part1-accessors-and-flags.patch Review of attachment 8990761 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8990761 -
Flags: review?(arai.unmht) → review+
Updated•6 years ago
|
Attachment #8990763 -
Flags: review?(arai.unmht) → review+
Assignee | ||
Comment 4•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2133169d4fc2576043c38a0f2f92d2af7b13925a
Keywords: checkin-needed
Pushed by aiakab@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f80f0ce62873 Part 1: Add accessors for Promise fixed slots and combine default resolving functions flags. r=arai https://hg.mozilla.org/integration/mozilla-inbound/rev/ff0152ae26bd Part 2: Don't use BlockOnPromise fast path with non-default resolving functions. r=arai
Keywords: checkin-needed
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f80f0ce62873 https://hg.mozilla.org/mozilla-central/rev/ff0152ae26bd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•