WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159615
[ES6] Promise.{all,race} no longer use @@species
https://bugs.webkit.org/show_bug.cgi?id=159615
Summary
[ES6] Promise.{all,race} no longer use @@species
Yusuke Suzuki
Reported
2016-07-10 22:43:32 PDT
[ES6] Promise.{all,race} no longer use @@species
Attachments
Patch
(3.53 KB, patch)
2016-07-10 22:51 PDT
,
Yusuke Suzuki
keith_miller
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2016-07-10 22:51:37 PDT
Created
attachment 283300
[details]
Patch
Keith Miller
Comment 2
2016-07-10 23:02:52 PDT
Comment on
attachment 283300
[details]
Patch r=me. I'm curious what the reasoning behind dropping @@species support was.
Yusuke Suzuki
Comment 3
2016-07-11 00:09:57 PDT
(In reply to
comment #2
)
> Comment on
attachment 283300
[details]
> Patch > > r=me. I'm curious what the reasoning behind dropping @@species support was.
https://github.com/tc39/ecma262/issues/151
https://esdiscuss.org/topic/resolve-reject-on-promise-subclasses-and-species#content-1
https://esdiscuss.org/topic/subclassing-es6-objects-with-es5-syntax#content-50
> Overall consistency in the language. Except for the two offending Promise static methods, all uses of @@species in the ES2015 spec (15 uses) are for the following pattern: Starting from one instance, one constructs a derived object for that instance. (The effective lookup of the @@species property is factored in the SpiecesConstructor and ArraySpeciesCreate abstract operations.) > > Also, in static methods like Promise.all and Promise.race, a constructor is explicitly provided by the user: simply use it. Compare with what is done for arrays:
Seems that Promise.{resolve,reject,all,race} static functions are a factory function while Array#map etc. is an instance method.
Yusuke Suzuki
Comment 4
2016-07-11 00:10:40 PDT
(In reply to
comment #3
) In the above comment, this is the quoted part from the es-discuss :)
> > Overall consistency in the language. Except for the two offending Promise static methods, all uses of @@species in the ES2015 spec (15 uses) are for the following pattern: Starting from one instance, one constructs a derived object for that instance. (The effective lookup of the @@species property is factored in the SpiecesConstructor and ArraySpeciesCreate abstract operations.) > > > > Also, in static methods like Promise.all and Promise.race, a constructor is explicitly provided by the user: simply use it. Compare with what is done for arrays:
Yusuke Suzuki
Comment 5
2016-07-11 00:27:21 PDT
Committed
r203052
: <
http://trac.webkit.org/changeset/203052
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug