Closed Bug 1393053 Opened 8 years ago Closed 8 years ago

Remove an unnecessary call to GetPrototypeFromConstructor for wrapped promise constructors

Categories

(Core :: JavaScript: Standard Library, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

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.
Attached patch bug1393053.patchSplinter Review
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+
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
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: