@@ -38347,6 +38347,8 @@ <h1>Runtime Semantics: PerformPromiseAll ( _iteratorRecord_, _constructor_, _res
38347
38347
1. Assert: _resultCapability_ is a PromiseCapability Record.
38348
38348
1. Let _values_ be a new empty List.
38349
38349
1. Let _remainingElementsCount_ be a new Record { [[Value]]: 1 }.
38350
+ 1. Let _promiseResolve_ be ? Get(_constructor_, `"resolve"`).
38351
+ 1. If ! IsCallable(_promiseResolve_) is *false*, throw a *TypeError* exception.
38350
38352
1. Let _index_ be 0.
38351
38353
1. Repeat,
38352
38354
1. Let _next_ be IteratorStep(_iteratorRecord_).
@@ -38363,7 +38365,7 @@ <h1>Runtime Semantics: PerformPromiseAll ( _iteratorRecord_, _constructor_, _res
38363
38365
1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*.
38364
38366
1. ReturnIfAbrupt(_nextValue_).
38365
38367
1. Append *undefined* to _values_.
38366
- 1. Let _nextPromise_ be ? Invoke(_constructor_, `"resolve"` , « _nextValue_ »).
38368
+ 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_ , « _nextValue_ »).
38367
38369
1. Let _steps_ be the algorithm steps defined in <emu-xref href="#sec-promise.all-resolve-element-functions" title></emu-xref>.
38368
38370
1. Let _resolveElement_ be CreateBuiltinFunction(_steps_, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »).
38369
38371
1. Set _resolveElement_.[[AlreadyCalled]] to a new Record { [[Value]]: *false* }.
@@ -38434,6 +38436,8 @@ <h1>Runtime Semantics: PerformPromiseRace ( _iteratorRecord_, _constructor_, _re
38434
38436
<emu-alg>
38435
38437
1. Assert: IsConstructor(_constructor_) is *true*.
38436
38438
1. Assert: _resultCapability_ is a PromiseCapability Record.
38439
+ 1. Let _promiseResolve_ be ? Get(_constructor_, `"resolve"`).
38440
+ 1. If ! IsCallable(_promiseResolve_) is *false*, throw a *TypeError* exception.
38437
38441
1. Repeat,
38438
38442
1. Let _next_ be IteratorStep(_iteratorRecord_).
38439
38443
1. If _next_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*.
@@ -38444,7 +38448,7 @@ <h1>Runtime Semantics: PerformPromiseRace ( _iteratorRecord_, _constructor_, _re
38444
38448
1. Let _nextValue_ be IteratorValue(_next_).
38445
38449
1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*.
38446
38450
1. ReturnIfAbrupt(_nextValue_).
38447
- 1. Let _nextPromise_ be ? Invoke(_constructor_, `"resolve"` , « _nextValue_ »).
38451
+ 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_ , « _nextValue_ »).
38448
38452
1. Perform ? Invoke(_nextPromise_, `"then"`, « _resultCapability_.[[Resolve]], _resultCapability_.[[Reject]] »).
38449
38453
</emu-alg>
38450
38454
</emu-clause>
0 commit comments