resolve()/reject() on Promise subclasses and @@species

Boris Zbarsky bzbarsky at
Thu Oct 29 02:51:25 UTC 2015

I was just implementing subclassing of Promise in Gecko, when I realized 
that given a Promise subclass MyPromise these two calls:


will take MyPromise[@@species] into account when creating the return 
value, but these two calls:


will not; they will invoke MyPromise itself, not MyPromise[@@species].

This is because and do the 
whole @@species thing but and do not.

Is this behavior intentional?  If so, I'd really like to understand the 
reason for it.


More information about the es-discuss mailing list