Remove an unnecessary call to GetPrototypeFromConstructor for wrapped promise constructors

RESOLVED FIXED in Firefox 57

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: anba, Assigned: anba)

Tracking

Trunk
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
We don't need to go through GetPrototypeFromConstructor for wrapped Promise constructors (http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/js/src/builtin/Promise.cpp#1377), instead we can simply get %PromisePrototype% from the target compartment. 

---

There are some open GetPrototypeFromConstructor spec-compliance bugs (bug 1288457, bug 1317416), but before attempting to fix those, we should revisit the existing GetPrototypeFromConstructor callers to get a better picture which changes are necessary for bug 1288457 and bug 1317416.
(Assignee)

Comment 1

a year ago
Created attachment 8900281 [details] [diff] [review]
bug1393053.patch
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Attachment #8900281 - Flags: review?(till)
Comment on attachment 8900281 [details] [diff] [review]
bug1393053.patch

Review of attachment 8900281 [details] [diff] [review]:
-----------------------------------------------------------------

Ah, much nicer - thanks!
Attachment #8900281 - Flags: review?(till) → review+

Comment 4

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e63b09da86eb
Directly get built-in %PromisePrototype% instead of going through GetPrototypeFromConstructor. r=till
Keywords: checkin-needed

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e63b09da86eb
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.