Rename Promise.cast to Promise.resolve

RESOLVED FIXED in Firefox 29

Status

()

RESOLVED FIXED
5 years ago
7 days ago

People

(Reporter: annevk, Assigned: nsm)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

unspecified
mozilla30
x86
macOS
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox29+ fixed, firefox30+ fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
And remove the existing Promise.resolve. Based on TC39 consensus reached yesterday. (No public pointer yet.)

Down the road we can probably simplify the internal model due to this change as well, but I guess for now it's mostly important not to expose soon-to-be-legacy API.

Comment 1

5 years ago
According to <https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-01/jan-30.md#conclusionresolution-3> and as noted in the es-discuss list, I think this change can now proceed and be uplifted to Aurora.

In the unlikely case that a new consensus arises in the future for which "cast" is reintroduced, it will be easier to add a new method than remove an existing one. (The potential loss of the "resolve" optimization following the reintroduction of "cast" is an internal detail that would be transparent to all real-world consumers.)
status-firefox29: --- → affected
status-firefox30: --- → affected
tracking-firefox29: --- → ?
tracking-firefox30: --- → ?
Please consider a patch to make sure it reaches Aurora quickly.

Promise was part of the highlight of the release notes:
https://www.mozilla.org/en-US/firefox/29.0a2/auroranotes/
tracking-firefox29: ? → +
tracking-firefox30: ? → +
Comment on attachment 8373419 [details] [diff] [review]
Rename Promise.cast to Promise.resolve.

r=me
Attachment #8373419 - Flags: review?(bzbarsky) → review+
(Reporter)

Updated

5 years ago
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/6b783305b12a
Status: NEW → RESOLVED
Last Resolved: 5 years ago
status-firefox30: affected → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment on attachment 8373419 [details] [diff] [review]
Rename Promise.cast to Promise.resolve.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
DOM Promises
User impact if declined: 
We'd ship a implementation that has just been obsoleted in the spec.
Testing completed (on m-c, etc.): 
Yes
Risk to taking this patch (and alternatives if risky): 
None, it's just dropping a method that we haven't shipped to anything beyond a Aurora
String or IDL/UUID changes made by this patch:
None
Attachment #8373419 - Flags: approval-mozilla-aurora?
Attachment #8373419 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Do we have a bug to rehost/"nativize" in SpiderMonkey?

Thanks for tracking the ES6 promises twists and turns here.

/be
(Reporter)

Comment 10

5 years ago
That is bug 911216. We don't really have a plan for that yet because we a) lack an event loop and b) the main benefit would be better subclassing support which we don't have yet.
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.