[ES6] Promise.{all,race} no longer use @@species
Created attachment 283300 [details] Patch
Comment on attachment 283300 [details] Patch r=me. I'm curious what the reasoning behind dropping @@species support was.
(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.
(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:
Committed r203052: <http://trac.webkit.org/changeset/203052>