archives

« Bugzilla Issues Index

#4388 — Reorder arguments for PerformPromiseRace


The arguments for PerformPromiseAll are:
( iteratorRecord, constructor, resultCapability)
The arguments for PerformPromiseRace are:
( iteratorRecord, promiseCapability, C )

It would be more pleasant if these two helpers shared the same argument order and names. I like the names for PerformPromiseAll, so that suggests that:

1. The 2nd and 3rd arguments to PerformPromiseRace be switched in the definition of Promise.race step 11.

2. The argument names be changed in the heading for 25.4.4.3.1 ("Runtime Semantics: PerformPromiseRace")

3. "promiseCapability" be changed to "resultCapability" in step 1.d.ii and 1.j in the definition of PerformPromiseRace

4. "C" be changed to "constructor" in step 1.h

If you'd like to play it safe, just switching the argument order in the heading to 25.4.4.3.1 and the callsite in Promise.race step 11 would at least help some.


deferred to es7