| call-resolve-element-after-return.js |
---
es6id: 25.4.4.1.2
description: >
Cannot change result value of resolved Promise.all element after Promise.all() returned.
info: |
Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
1515 |
- |
| call-resolve-element-items.js |
---
es6id: 25.4.4.1.2
description: >
Cannot change result value of resolved Promise.all elements.
info: |
Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
1355 |
- |
| call-resolve-element.js |
---
es6id: 25.4.4.1.2
description: >
Cannot change result value of resolved Promise.all element.
info: |
Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
1137 |
- |
| capability-executor-called-twice.js |
---
es6id: 25.4.4.1
description: >
Throws a TypeError if capabilities executor already called with non-undefined values.
info: |
Promise.all ( iterable )
...
6. Let promiseCapability be NewPromiseCapability(C).
7. ReturnIfAbrupt(promiseCapability).
...
25.4.1.5.1 GetCapabilitiesExecutor Functions
...
3. If promiseCapability.[[Resolve]] is not undefined, throw a TypeError exception.
4. If promiseCapability.[[Reject]] is not undefined, throw a TypeError exception.
5. Set promiseCapability.[[Resolve]] to resolve.
6. Set promiseCapability.[[Reject]] to reject.
...
--- |
2549 |
- |
| capability-executor-not-callable.js |
---
es6id: 25.4.4.1
description: >
Throws a TypeError if either resolve or reject capability is not callable.
info: |
Promise.all ( iterable )
...
6. Let promiseCapability be NewPromiseCapability(C).
7. ReturnIfAbrupt(promiseCapability).
...
25.4.1.5 NewPromiseCapability ( C )
...
4. Let executor be a new built-in function object as defined in GetCapabilitiesExecutor Functions (25.4.1.5.1).
5. Set the [[Capability]] internal slot of executor to promiseCapability.
6. Let promise be Construct(C, «executor»).
7. ReturnIfAbrupt(promise).
8. If IsCallable(promiseCapability.[[Resolve]]) is false, throw a TypeError exception.
9. If IsCallable(promiseCapability.[[Reject]]) is false, throw a TypeError exception.
...
--- |
2720 |
- |
| capability-resolve-throws-no-close.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Iterator is not closed when the "resolve" capability returns an abrupt
completion.
info: |
1. Let C be the this value.
[...]
3. Let promiseCapability be ? NewPromiseCapability(C).
[...]
7. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
8. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
d. If next is false, then
[...]
iii. If remainingElementsCount.[[Value]] is 0, then
1. Let valuesArray be CreateArrayFromList(values).
2. Perform ? Call(resultCapability.[[Resolve]], undefined, «
valuesArray »).
25.4.1.1.1 IfAbruptRejectPromise
IfAbruptRejectPromise is a short hand for a sequence of algorithm steps that
use a PromiseCapability Record. An algorithm step of the form:
1. IfAbruptRejectPromise(value, capability).
means the same thing as:
1. If value is an abrupt completion, then
a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »).
b. Return capability.[[Promise]].
2. Else if value is a Completion Record, let value be value.[[Value]].
features: [Symbol.iterator]
--- |
2019 |
- |
| capability-resolve-throws-reject.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Promise is rejected when the "resolve" capability returns an abrupt
completion.
info: |
1. Let C be the this value.
[...]
3. Let promiseCapability be ? NewPromiseCapability(C).
[...]
7. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
8. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
d. If next is false, then
[...]
iii. If remainingElementsCount.[[Value]] is 0, then
1. Let valuesArray be CreateArrayFromList(values).
2. Perform ? Call(resultCapability.[[Resolve]], undefined, «
valuesArray »).
25.4.1.1.1 IfAbruptRejectPromise
IfAbruptRejectPromise is a short hand for a sequence of algorithm steps that
use a PromiseCapability Record. An algorithm step of the form:
1. IfAbruptRejectPromise(value, capability).
means the same thing as:
1. If value is an abrupt completion, then
a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »).
b. Return capability.[[Promise]].
2. Else if value is a Completion Record, let value be value.[[Value]].
flags: [async]
--- |
1965 |
- |
| ctx-ctor-throws.js |
---
description: >
`Promise.all` invoked on a constructor value that throws an error
es6id: 25.4.4.1
info: |
1. Let C be the this value.
[...]
6. Let promiseCapability be NewPromiseCapability(C).
7. ReturnIfAbrupt(promiseCapability).
25.4.1.5 NewPromiseCapability
[...]
6. Let promise be Construct(C, «executor»).
7. ReturnIfAbrupt(promise).
--- |
674 |
- |
| ctx-ctor.js |
---
description: >
`Promise.all` invoked on a constructor value
es6id: 25.4.4.1
info: |
1. Let C be the this value.
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
10. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
13. Return Completion(result).
features: [class]
--- |
959 |
- |
| ctx-non-ctor.js |
---
description: >
`Promise.all` invoked on a non-constructor value
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
7. ReturnIfAbrupt(promiseCapability).
25.4.1.5 NewPromiseCapability ( C )
1. If IsConstructor(C) is false, throw a TypeError exception.
--- |
529 |
- |
| ctx-non-object.js |
---
description: >
`Promise.all` invoked on a non-object value
es6id: 25.4.4.1
info: |
1. Let C be the this value.
2. If Type(C) is not Object, throw a TypeError exception.
features: [Symbol]
--- |
800 |
- |
| does-not-invoke-array-setters.js |
---
es6id: 25.4.4.1.1
description: >
Indexed setter properties on Array.prototype are not invoked.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
4. Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
6.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
...
...
7.3.16 CreateArrayFromList (elements)
...
4. For each element e of elements
a. Let status be CreateDataProperty(array, ToString(n), e).
b. Assert: status is true.
...
flags: [async]
--- |
1025 |
- |
| invoke-resolve-error-close.js |
---
description: >
Explicit iterator closing in response to error
esid: sec-promise.all
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
j. ReturnIfAbrupt(nextPromise ).
features: [Symbol.iterator]
--- |
1170 |
- |
| invoke-resolve-error-reject.js |
---
description: Promise rejection in response to error
esid: sec-promise.all
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
j. ReturnIfAbrupt(nextPromise ).
flags: [async]
--- |
1110 |
- |
| invoke-resolve-get-error-close.js |
---
description: >
Error retrieving the constructor's `resolve` method (closing iterator)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
j. ReturnIfAbrupt(nextPromise ).
features: [Symbol.iterator]
--- |
1225 |
- |
| invoke-resolve-get-error-reject.js |
---
description: >
Error retrieving the constructor's `resolve` method (rejecting promise)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
j. ReturnIfAbrupt(nextPromise ).
flags: [async]
--- |
1124 |
- |
| invoke-resolve-return.js |
---
description: Use of the value returned by the constructor's `resolve` method.
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, promiseCapability, C).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
[...]
r. Let result be Invoke(nextPromise, "then", resolveElement,
promiseCapability.[[Reject]]»).
[...]
--- |
1246 |
- |
| invoke-resolve.js |
---
description: >
Invocation of the constructor's `resolve` method
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
i. Let nextPromise be Invoke(constructor, "resolve", «nextValue»).
--- |
1256 |
- |
| invoke-then-error-close.js |
---
description: >
Error thrown when invoking the instance's `then` method (closing iterator)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", «resolveElement,
resultCapability.[[Reject]]»).
s. ReturnIfAbrupt(result).
features: [Symbol.iterator]
--- |
1283 |
- |
| invoke-then-error-reject.js |
---
description: >
Error thrown when invoking the instance's `then` method (rejecting Promise)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", «resolveElement,
resultCapability.[[Reject]]»).
s. ReturnIfAbrupt(result).
flags: [async]
--- |
1140 |
- |
| invoke-then-get-error-close.js |
---
description: >
Error thrown when accesing the instance's `then` method (closing iterator)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", «resolveElement,
resultCapability.[[Reject]]»).
s. ReturnIfAbrupt(result).
features: [Symbol.iterator]
--- |
1323 |
- |
| invoke-then-get-error-reject.js |
---
description: >
Error thrown when accessing the instance's `then` method (rejecting Promise)
esid: sec-performpromiseall
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", «resolveElement,
resultCapability.[[Reject]]»).
s. ReturnIfAbrupt(result).
flags: [async]
--- |
1180 |
- |
| invoke-then.js |
---
description: >
Invocation of the instance's `then` method
es6id: 25.4.4.1
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", «resolveElement,
resultCapability.[[Reject]]»).
--- |
1504 |
- |
| iter-next-val-err-no-close.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Error when accessing an iterator result's `value` property (not closing
iterator)
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
e. Let nextValue be IteratorValue(next).
f. If nextValue is an abrupt completion, set iteratorRecord.[[done]] to
true.
g. ReturnIfAbrupt(nextValue).
features: [Symbol.iterator]
--- |
1377 |
- |
| iter-next-val-err-reject.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Error when accessing an iterator result's `value` property (rejecting
promise)
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
e. Let nextValue be IteratorValue(next).
f. If nextValue is an abrupt completion, set iteratorRecord.[[done]] to
true.
g. ReturnIfAbrupt(nextValue).
features: [Symbol.iterator]
flags: [async]
--- |
1402 |
- |
| iter-step-err-no-close.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Error when advancing the provided iterable (not closing iterator)
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to
true.
c. ReturnIfAbrupt(next).
features: [Symbol.iterator]
--- |
1466 |
- |
| iter-step-err-reject.js |
---
esid: sec-promise.all
es6id: 25.4.4.1
description: >
Error when advancing the provided iterable (rejecting promise)
info: |
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
12. If result is an abrupt completion,
a. If iteratorRecord.[[done]] is false, let result be
IteratorClose(iterator, result).
b. IfAbruptRejectPromise(result, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to
true.
c. ReturnIfAbrupt(next).
features: [Symbol.iterator]
flags: [async]
--- |
1491 |
- |
| length.js |
---
es6id: 25.4.4.1
description: Promise.all `length` property
info: |
ES6 Section 17:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this value
is equal to the largest number of named arguments shown in the subclause
headings for the function description, including optional parameters.
[...]
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
935 |
- |
| name.js |
---
es6id: 25.4.4.1
description: Promise.all `name` property
info: |
ES6 Section 17:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value is a
String. Unless otherwise specified, this value is the name that is given to
the function in this specification.
[...]
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
909 |
- |
| new-resolve-function.js |
---
es6id: 25.4.4.1.1
description: >
Each Promise.all element is called with a new Promise.all Resolve Element function.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
k. Let resolveElement be a new built-in function object as defined in Promise.all Resolve Element Functions.
...
r. Let result be Invoke(nextPromise, "then", «resolveElement, resultCapability.[[Reject]]»).
...
--- |
1371 |
- |
| prop-desc.js |
---
es6id: 25.4.4.1_A1.3_T1
author: Jordan Harband
description: Promise.all property descriptor
info: |
ES6 Section 17
Every other data property described in clauses 18 through 26 and in Annex
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
--- |
560 |
- |
| reject-deferred.js |
---
description: Rejecting through deferred invocation of the provided resolving function
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, promiseCapability, C).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", resolveElement,
promiseCapability.[[Reject]]»).
25.4.1.3.1 Promise Reject Functions
[...]
6. Return RejectPromise(promise, reason).
flags: [async]
--- |
1046 |
- |
| reject-ignored-deferred.js |
---
description: >
Resolved promises ignore rejections through deferred invocation of the
provided resolving function
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, promiseCapability, C).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", resolveElement,
promiseCapability.[[Reject]]»).
25.4.1.3.1 Promise Reject Functions
[...]
2. Let promise be the value of F's [[Promise]] internal slot.
3. Let alreadyResolved be the value of F's [[AlreadyResolved]] internal
slot.
4. If alreadyResolved.[[value]] is true, return undefined.
flags: [async]
--- |
1459 |
- |
| reject-ignored-immed.js |
---
description: >
Resolved promises ignore rejections through immediate invocation of the
provided resolving function
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, promiseCapability, C).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", resolveElement,
promiseCapability.[[Reject]]»).
25.4.1.3.1 Promise Reject Functions
[...]
2. Let promise be the value of F's [[Promise]] internal slot.
3. Let alreadyResolved be the value of F's [[AlreadyResolved]] internal
slot.
4. If alreadyResolved.[[value]] is true, return undefined.
flags: [async]
--- |
1258 |
- |
| reject-immed.js |
---
description: Rejecting through immediate invocation of the provided resolving function
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, promiseCapability, C).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
r. Let result be Invoke(nextPromise, "then", resolveElement,
promiseCapability.[[Reject]]»).
25.4.1.3.1 Promise Reject Functions
[...]
6. Return RejectPromise(promise, reason).
flags: [async]
--- |
944 |
- |
| resolve-before-loop-exit-from-same.js |
---
es6id: 25.4.4.1.1
description: >
Cannot tamper remainingElementsCount when Promise.all resolve element function is called twice in a row.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
4. Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
6.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]], undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult).
...
25.4.4.1.2 Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
2144 |
- |
| resolve-before-loop-exit.js |
---
es6id: 25.4.4.1.1
description: >
Cannot tamper remainingElementsCount when two Promise.all resolve element functions are called in succession.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
4. Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
6.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]], undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult).
...
25.4.4.1.2 Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
2045 |
- |
| resolve-element-function-extensible.js |
---
es6id: 25.4.4.1.2
description: The [[Extensible]] slot of Promise.all Resolve Element functions
info: |
17 ECMAScript Standard Built-in Objects:
Unless specified otherwise, the [[Extensible]] internal slot
of a built-in object initially has the value true.
--- |
752 |
- |
| resolve-element-function-length.js |
---
es6id: 25.4.4.1.2
description: The `length` property of Promise.all Resolve Element functions
info: |
The length property of a Promise.all resolve element function is 1.
17 ECMAScript Standard Built-in Objects:
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
1074 |
- |
| resolve-element-function-name.js |
---
es6id: 25.4.4.1.2
description: The `name` property of Promise.all Resolve Element functions
info: |
A promise resolve function is an anonymous built-in function.
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
--- |
896 |
- |
| resolve-element-function-nonconstructor.js |
---
es6id: 25.4.4.1.2
description: Promise.all Resolve Element functions are not constructors
info: |
17 ECMAScript Standard Built-in Objects:
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified
in the description of a particular function.
--- |
948 |
- |
| resolve-element-function-prototype.js |
---
es6id: 25.4.4.1.2
description: The [[Prototype]] of Promise.all Resolve Element functions
info: |
17 ECMAScript Standard Built-in Objects:
Unless otherwise specified every built-in function and every built-in
constructor has the Function prototype object, which is the initial
value of the expression Function.prototype (19.2.3), as the value of
its [[Prototype]] internal slot.
--- |
914 |
- |
| resolve-from-same-thenable.js |
---
es6id: 25.4.4.1.1
description: >
Cannot tamper remainingElementsCount when Promise.all resolve element function is called multiple times.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
4. Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
6.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]], undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult).
...
25.4.4.1.2 Promise.all Resolve Element Functions
1. Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
2. If alreadyCalled.[[value]] is true, return undefined.
3. Set alreadyCalled.[[value]] to true.
...
--- |
2354 |
- |
| resolve-non-thenable.js |
---
description: Resolving with a non-thenable object value
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
d. If next is false,
[...]
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]],
undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult)
iv. Return resultCapability.[[Promise]].
25.4.1.3.2 Promise Resolve Functions
[...]
8. Let then be Get(resolution, "then").
9. If then is an abrupt completion, then
[...]
10. Let thenAction be then.[[value]].
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
flags: [async]
--- |
2123 |
- |
| resolve-poisoned-then.js |
---
description: Resolving with an object with a "poisoned" `then` property
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
d. If next is false,
[...]
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]],
undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult)
iv. Return resultCapability.[[Promise]].
7.3.16 CreateArrayFromList (elements)
[...]
2. Let array be ArrayCreate(0) (see 9.4.2.2).
9.4.2.2 ArrayCreate(length, proto)
[...]
4. If the proto argument was not passed, let proto be the intrinsic object
%ArrayPrototype%.
5. Let A be a newly created Array exotic object.
[...]
8. Set the [[Prototype]] internal slot of A to proto.
25.4.1.3.2 Promise Resolve Functions
[...]
8. Let then be Get(resolution, "then").
9. If then is an abrupt completion, then
a. Return RejectPromise(promise, then.[[value]]).
flags: [async]
--- |
1932 |
- |
| resolve-thenable.js |
---
description: Resolving with a thenable object value
es6id: 25.4.4.1
info: |
[...]
6. Let promiseCapability be NewPromiseCapability(C).
[...]
11. Let result be PerformPromiseAll(iteratorRecord, C, promiseCapability).
[...]
25.4.4.1.1 Runtime Semantics: PerformPromiseAll
[...]
6. Repeat
[...]
d. If next is false,
[...]
iii. If remainingElementsCount.[[value]] is 0,
1. Let valuesArray be CreateArrayFromList(values).
2. Let resolveResult be Call(resultCapability.[[Resolve]],
undefined, «valuesArray»).
3. ReturnIfAbrupt(resolveResult)
iv. Return resultCapability.[[Promise]].
7.3.16 CreateArrayFromList (elements)
[...]
2. Let array be ArrayCreate(0) (see 9.4.2.2).
9.4.2.2 ArrayCreate(length, proto)
[...]
4. If the proto argument was not passed, let proto be the intrinsic object
%ArrayPrototype%.
5. Let A be a newly created Array exotic object.
[...]
8. Set the [[Prototype]] internal slot of A to proto.
25.4.1.3.2 Promise Resolve Functions
[...]
8. Let then be Get(resolution, "then").
9. If then is an abrupt completion, then
[...]
10. Let thenAction be then.[[value]].
11. If IsCallable(thenAction) is false, then
[...]
12. Perform EnqueueJob ("PromiseJobs", PromiseResolveThenableJob,
«promise, resolution, thenAction»)
flags: [async]
--- |
2029 |
- |
| S25.4.4.1_A1.1_T1.js |
---
info: Promise.all is callable
es6id: 25.4.4.1_A1.1_T1
author: Sam Mikes
description: Promise.all is callable
--- |
307 |
- |
| S25.4.4.1_A2.1_T1.js |
---
info: Promise.all([]) is a Promise
es6id: 25.4.4.1_A2.1_T1
author: Sam Mikes
description: Promise.all returns a Promise
--- |
320 |
- |
| S25.4.4.1_A2.2_T1.js |
---
info: Promise.all([]) is resolved immediately
es6id: 25.4.4.1_A2.2_T1
author: Sam Mikes
includes: [promiseHelper.js]
description: Promise.all([]) returns immediately
flags: [async]
--- |
585 |
- |
| S25.4.4.1_A2.3_T1.js |
---
info: Promise.all([]) returns a promise for a new empty array
es6id: 25.4.4.1_A2.3_T1
author: Sam Mikes
description: Promise.all([]) returns a promise for an array
flags: [async]
--- |
465 |
- |
| S25.4.4.1_A2.3_T2.js |
---
info: Promise.all is resolved with a new empty array
es6id: 25.4.4.1_A2.3_T2
author: Sam Mikes
description: Promise.all([]) returns a Promise for an empty array
flags: [async]
--- |
465 |
- |
| S25.4.4.1_A2.3_T3.js |
---
info: Promise.all([]) is resolved with Promise for a new empty array
es6id: 25.4.4.1_A2.3_T3
author: Sam Mikes
description: Promise.all([]) is resolved with a Promise for a new array
flags: [async]
--- |
485 |
- |
| S25.4.4.1_A3.1_T1.js |
---
info: |
Promise.all expects an iterable argument;
ref 7.4.1 non-Object fails CheckIterable
ref 7.4.2 GetIterator throws TypeError if CheckIterable fails
es6id: 25.4.4.1_A3.1_T1
author: Sam Mikes
description: Promise.all(3) returns Promise rejected with TypeError
flags: [async]
--- |
678 |
- |
| S25.4.4.1_A3.1_T2.js |
---
info: |
Promise.all expects an iterable argument;
fails if recieves an abrupt completion
ref 7.4.1 non-Object fails CheckIterable
ref 7.4.2 GetIterator throws TypeError if CheckIterable fails
es6id: S25.4.4.1_A3.1_T2
author: Sam Mikes
description: Promise.all(new Error()) returns Promise rejected with TypeError
flags: [async]
--- |
723 |
- |
| S25.4.4.1_A3.1_T3.js |
---
info: |
Promise.all expects an iterable argument;
fails if GetIterator returns an abrupt completion.
es6id: S25.4.4.1_A3.1_T3
author: Sam Mikes
description: Promise.all((throw on GetIterator)) returns Promise rejected with TypeError
features: [Symbol.iterator]
flags: [async]
--- |
814 |
- |
| S25.4.4.1_A4.1_T1.js |
---
info: |
Promise.all should throw if 'this' does not conform to Promise constructor
es6id: S25.4.4.1_A4.1_T1
description: this must conform to Promise constructor in Promise.all
author: Sam Mikes
--- |
421 |
- |
| S25.4.4.1_A5.1_T1.js |
---
info: |
Promise.all expects an iterable argument;
rejects if IteratorStep() throws
es6id: S25.4.4.1_A5.1_T1
author: Sam Mikes
description: iterator.next throws, causing Promise.all to reject
features: [Symbol.iterator]
flags: [async]
--- |
721 |
- |
| S25.4.4.1_A6.1_T1.js |
---
info: |
Promise.all with 0-element array
es6id: S25.4.4.1_A5.1_T1
author: Sam Mikes
description: Promise.all([]) produces a promise
--- |
366 |
- |
| S25.4.4.1_A6.1_T2.js |
---
info: |
Promise.all with 0-element array
should accept an empty array
es6id: S25.4.4.1_A6.1_T2
author: Sam Mikes
description: Promise.all([]) returns a promise for an empty array
flags: [async]
--- |
602 |
- |
| S25.4.4.1_A7.1_T1.js |
---
info: |
Promise.all with 1-element array
should accept an array with settled promise
es6id: S25.4.4.1_A6.1_T2
author: Sam Mikes
description: Promise.all([p1]) is resolved with a promise for a one-element array
flags: [async]
--- |
910 |
- |
| S25.4.4.1_A7.2_T1.js |
---
info: |
Promise.all with 1-element array
should accept an array with settled promise
es6id: S25.4.4.1_A7.2_T1
author: Sam Mikes
description: Promise.all() accepts a one-element array
includes: [promiseHelper.js]
flags: [async]
--- |
843 |
- |
| S25.4.4.1_A8.1_T1.js |
---
es6id: S25.4.4.1_A8.1_T1
author: Sam Mikes
description: Promise.all([p1, p2]) resolution functions are called in predictable sequence
includes: [promiseHelper.js]
flags: [async]
--- |
836 |
- |
| S25.4.4.1_A8.2_T1.js |
---
info: |
Promise.all with 2-element array
es6id: S25.4.4.1_A8.1_T1
author: Sam Mikes
description: Promise.all() rejects when a promise in its array rejects
flags: [async]
--- |
659 |
- |
| S25.4.4.1_A8.2_T2.js |
---
info: |
Promise.all with 2-element array
es6id: S25.4.4.1_A8.2_T2
author: Sam Mikes
description: Promise.all() rejects when second promise in array rejects
flags: [async]
--- |
653 |
- |
| same-reject-function.js |
---
es6id: 25.4.4.1.1
description: >
Each Promise.all element is called with the same reject function.
info: |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability)
...
r. Let result be Invoke(nextPromise, "then", «resolveElement, resultCapability.[[Reject]]»).
...
--- |
1083 |
- |
| species-get-error.js |
---
description: >
Promise.all() does not retrieve `Symbol.species` property of the `this` value
es6id: 25.4.4.1
info: |
1. Let C be the this value.
2. If Type(C) is not Object, throw a TypeError exception.
3. Let promiseCapability be ? NewPromiseCapability(C).
...
features: [Symbol.species]
--- |
673 |
- |