Closed
Bug 973988
Opened 9 years ago
Closed 9 years ago
DOM Promise constructor should call the executor with `undefined` as thisArg
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: bbenvie, Assigned: wchen)
Details
Attachments
(1 file)
2.80 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
> "use strict";
> new Promise(() => assert(this === undefined));
Currently this test fails in our implementation. |this| in the executor is the new Promise object itself, rather than undefined.
See ES6 spec draft January 2014 revision section 25.4.3.1.1 InitialisePromise, step 8.
Comment 1•9 years ago
|
||
'this' in an arrow function doesn't work how you think it works.
Reporter | ||
Comment 2•9 years ago
|
||
Woops, my example was incorrect but what I said is right:
> new Promise(function(){ console.log(this) }); // [object Promise]
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8377951 -
Flags: review?(bzbarsky)
![]() |
||
Comment 6•9 years ago
|
||
Comment on attachment 8377951 [details] [diff] [review] DOM Promise constructor should call the executor with "undefined" as thisArg r=me assuming the spec is clear on this and whatnot.
Attachment #8377951 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c6b2dcd79eb
Flags: in-testsuite+
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5c6b2dcd79eb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•4 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•