browser.js |
|
0 |
call-reject-element-after-return.js |
---
esid: sec-promise.any-reject-element-functions
description: >
Cannot change result value of rejected Promise.any element after Promise.any() returned.
info: |
Promise.any Reject Element Functions
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
features: [Promise.any]
--- |
1341 |
call-reject-element-items.js |
---
esid: sec-promise.any-reject-element-functions
description: >
Cannot change result value of rejected Promise.any elements.
info: |
Promise.any Reject Element Functions
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
features: [Promise.any]
--- |
1448 |
capability-executor-called-twice.js |
---
esid: sec-promise.any
description: >
Throws a TypeError if capabilities executor already called with non-undefined values.
info: |
Promise.any ( iterable )
...
2. Let promiseCapability be ? NewPromiseCapability(C).
...
GetCapabilitiesExecutor Functions
...
4. If promiseCapability.[[Resolve]] is not undefined, throw a TypeError exception.
5. If promiseCapability.[[Reject]] is not undefined, throw a TypeError exception.
6. Set promiseCapability.[[Resolve]] to resolve.
7. Set promiseCapability.[[Reject]] to reject.
...
features: [Promise.any]
--- |
2909 |
capability-executor-not-callable.js |
---
esid: sec-promise.any
description: >
Throws a TypeError if either resolve or reject capability is not callable.
info: |
Promise.any ( iterable )
...
2. Let promiseCapability be ? NewPromiseCapability(C).
...
NewPromiseCapability ( C )
...
5. Let executor be ! CreateBuiltinFunction(steps, « [[Capability]] »).
6. Set executor.[[Capability]] to promiseCapability.
7. Let promise be ? Construct(C, « executor »).
8. If IsCallable(promiseCapability.[[Resolve]]) is false, throw a TypeError exception.
9. If IsCallable(promiseCapability.[[Reject]]) is false, throw a TypeError exception.
...
features: [Promise.any]
--- |
3100 |
capability-reject-throws-no-close.js |
---
esid: sec-promise.any
description: >
Iterator is not closed when the "resolve" capability returns an abrupt
completion.
info: |
Let C be the this value.
Let promiseCapability be ? NewPromiseCapability(C).
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
If result is an abrupt completion, then
If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
IfAbruptRejectPromise(result, promiseCapability).
Return Completion(result).
flags: [async]
features: [Promise.any, Symbol.iterator]
--- |
1697 |
capability-resolve-throws-no-close.js |
---
esid: sec-promise.any
description: >
Iterator is not closed when the "resolve" capability returns an abrupt
completion.
info: |
Let C be the this value.
Let promiseCapability be ? NewPromiseCapability(C).
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
If result is an abrupt completion, then
If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
IfAbruptRejectPromise(result, promiseCapability).
Return Completion(result).
flags: [async]
features: [Promise.any, Symbol.iterator]
--- |
1685 |
capability-resolve-throws-reject.js |
---
esid: sec-promise.any
description: >
Iterator is not closed when the "resolve" capability returns an abrupt
completion.
info: |
Let C be the this value.
Let promiseCapability be ? NewPromiseCapability(C).
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
If result is an abrupt completion, then
If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
IfAbruptRejectPromise(result, promiseCapability).
Return Completion(result).
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
1447 |
ctx-ctor-throws.js |
---
description: >
Promise.any invoked on a constructor value that throws an error
esid: sec-promise.any
info: |
2. Let promiseCapability be ? NewPromiseCapability(C).
NewPromiseCapability
...
7. Let promise be ? Construct(C, « executor »).
features: [Promise.any]
--- |
580 |
ctx-ctor.js |
---
description: >
Promise.any invoked on a constructor value
esid: sec-promise.any
info: |
2. Let promiseCapability be ? NewPromiseCapability(C).
...
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
...
7. Return Completion(result).
features: [Promise.any, class]
--- |
856 |
ctx-non-ctor.js |
---
description: >
Promise.any invoked on a non-constructor value
esid: sec-promise.any
info: |
...
2. Let promiseCapability be ? NewPromiseCapability(C).
NewPromiseCapability ( C )
1. If IsConstructor(C) is false, throw a TypeError exception.
features: [Promise.any, Symbol]
--- |
570 |
ctx-non-object.js |
---
description: >
Promise.any invoked on a non-object value
esid: sec-promise.any
info: |
...
2. Let promiseCapability be ? NewPromiseCapability(C).
NewPromiseCapability ( C )
1. If IsConstructor(C) is false, throw a TypeError exception.
features: [Promise.any, Symbol]
--- |
894 |
invoke-resolve-error-close.js |
---
description: >
Explicit iterator closing in response to error
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, Symbol.iterator, computed-property-names, Symbol, arrow-function]
--- |
1389 |
invoke-resolve-error-reject.js |
---
description: Promise rejection in response to error
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
988 |
invoke-resolve-get-error-reject.js |
---
description: >
Error retrieving the constructor's `resolve` method (rejecting promise)
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1055 |
invoke-resolve-get-error.js |
---
esid: sec-promise.any
description: >
Promise.resolve is retrieved before GetIterator call (abrupt lookup).
info: |
Promise.any ( iterable )
[...]
3. Let promiseResolve be GetPromiseResolve(C).
4. IfAbruptRejectPromise(promiseResolve, promiseCapability).
GetPromiseResolve ( promiseConstructor )
[...]
2. Let promiseResolve be ? Get(promiseConstructor, "resolve").
flags: [async]
features: [Promise.any, Symbol.iterator]
--- |
1036 |
invoke-resolve-get-once-multiple-calls.js |
---
description: >
Gets constructor's `resolve` method once from zero to many invocations.
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
6. Let promiseResolve be ? Get(constructor, "resolve").
7. If ! IsCallable(promiseResolve) is false, throw a TypeError exception.
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function, destructuring-binding]
--- |
1568 |
invoke-resolve-get-once-no-calls.js |
---
description: >
Gets constructor's `resolve` method once from zero to many invocations.
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
6. Let promiseResolve be ? Get(constructor, "resolve").
7. If ! IsCallable(promiseResolve) is false, throw a TypeError exception.
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function, destructuring-binding]
--- |
1479 |
invoke-resolve-on-promises-every-iteration-of-custom.js |
---
description: >
Invocation of the constructor's `resolve` method for iterable with promise values
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, class, arrow-function]
--- |
1273 |
invoke-resolve-on-promises-every-iteration-of-promise.js |
---
description: >
Invocation of the constructor's `resolve` method for iterable with promise values
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
915 |
invoke-resolve-on-values-every-iteration-of-custom.js |
---
description: >
Invocation of the constructor's `resolve` method for iterable with non-promise values
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, class, arrow-function]
--- |
1277 |
invoke-resolve-on-values-every-iteration-of-promise.js |
---
description: >
Invocation of the constructor's `resolve` method for iterable with non-promise values
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
930 |
invoke-resolve-return.js |
---
description: Use of the value returned by the constructor's `resolve` method.
esid: sec-promise.any
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
PerformPromiseAny
Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
...
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
features: [Promise.any]
--- |
1097 |
invoke-resolve.js |
---
description: >
Invocation of the constructor's `resolve` method
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
...
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
990 |
invoke-then-error-close.js |
---
description: >
Error thrown when invoking the instance's `then` method (closing iterator)
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, Symbol.iterator, arrow-function, computed-property-names, Symbol]
--- |
1387 |
invoke-then-error-reject.js |
---
description: >
Error thrown when invoking the instance's `then` method (rejecting Promise)
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1052 |
invoke-then-get-error-close.js |
---
description: >
Error thrown when accesing the instance's `then` method (closing iterator)
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, Symbol.iterator, arrow-function, computed-property-names, Symbol]
--- |
1416 |
invoke-then-get-error-reject.js |
---
description: >
Error thrown when accessing the instance's `then` method (rejecting Promise)
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1082 |
invoke-then-on-promises-every-iteration.js |
---
description: >
Invocation of the instance's `then` method
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1197 |
invoke-then.js |
---
description: >
Invocation of the instance's `then` method
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1300 |
is-function.js |
---
esid: sec-promise.any
description: Promise.any is callable
features: [Promise.any]
--- |
299 |
iter-arg-is-empty-iterable-reject.js |
---
esid: sec-promise.any
description: >
Promise.any([]) rejects with AggregateError, empty errors array.
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
...
3. Let errors be a new empty List.
...
8. Repeat,
a. Let next be IteratorStep(iteratorRecord).
b. If next is an abrupt completion, set iteratorRecord.[[Done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, then
i. Set iteratorRecord.[[Done]] to true.
ii. Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
iii. If remainingElementsCount.[[Value]] is 0, then
1. Let error be a newly created AggregateError object.
2. Set error.[[AggregateErrors]] to errors.
3. Return ThrowCompletion(error).
...
flags: [async]
features: [AggregateError, Promise.any, arrow-function]
--- |
1353 |
iter-arg-is-empty-string-reject.js |
---
esid: sec-promise.any
description: >
Promise.any('') rejects with AggregateError, empty errors array.
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
...
3. Let errors be a new empty List.
...
8. Repeat,
a. Let next be IteratorStep(iteratorRecord).
b. If next is an abrupt completion, set iteratorRecord.[[Done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, then
i. Set iteratorRecord.[[Done]] to true.
ii. Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
iii. If remainingElementsCount.[[Value]] is 0, then
1. Let error be a newly created AggregateError object.
2. Set error.[[AggregateErrors]] to errors.
3. Return ThrowCompletion(error).
...
features: [AggregateError, Promise.any, arrow-function]
flags: [async]
--- |
1351 |
iter-arg-is-error-object-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(new Test262Error()) rejects with TypeError.
info: |
Promise.any ( iterable )
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any]
flags: [async]
--- |
1185 |
iter-arg-is-false-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(false) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
#sec-getiterator
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any]
flags: [async]
--- |
1001 |
iter-arg-is-null-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(null) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
#sec-getiterator
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any]
flags: [async]
--- |
999 |
iter-arg-is-number-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(number) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
#sec-getiterator
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any]
flags: [async]
--- |
998 |
iter-arg-is-poisoned.js |
---
esid: sec-promise.any
description: >
Promise.any(poisoned iterable) rejects with whatever error is thrown.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
#sec-getiterator
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
...
features: [Promise.any, Symbol, Symbol.iterator, arrow-function]
flags: [async]
--- |
1117 |
iter-arg-is-string-resolve.js |
---
esid: sec-promise.any
description: >
Promise.any('non-empty-string') resolves with the first character in the non-empty string
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
#sec-getiterator
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, arrow-function]
flags: [async]
--- |
1032 |
iter-arg-is-symbol-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(Symbol()) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol]
flags: [async]
--- |
1408 |
iter-arg-is-true-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(true) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any]
flags: [async]
--- |
1392 |
iter-arg-is-undefined-reject.js |
---
esid: sec-promise.any
description: >
Promise.any(undefined) rejects with TypeError.
info: |
Promise.any ( iterable )
...
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any]
flags: [async]
--- |
1402 |
iter-assigned-false-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value false
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
i. Set method to ? GetMethod(obj, @@asyncIterator).
ii. If method is undefined, then
1. Let syncMethod be ? GetMethod(obj, @@iterator).
2. Let syncIteratorRecord be ? GetIterator(obj, sync, syncMethod).
...
4. Let iterator be ? Call(method, obj).
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1602 |
iter-assigned-null-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value null
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1496 |
iter-assigned-number-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value 1
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1490 |
iter-assigned-string-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value ""
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1492 |
iter-assigned-symbol-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value Symbol()
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol, Symbol.iterator, computed-property-names]
flags: [async]
--- |
1504 |
iter-assigned-true-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value true
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1496 |
iter-assigned-undefined-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator property has the value undefined
info: |
Promise.any ( iterable )
...
4. Let iteratorRecord be GetIterator(iterable).
5. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
3. If method is not present, then
a. If hint is async, then
...
b. Otherwise, set method to ? GetMethod(obj, @@iterator).
4. Let iterator be ? Call(method, obj).
5. If Type(iterator) is not Object, throw a TypeError exception.
...
GetMethod
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
Call ( F, V [ , argumentsList ] )
2. If IsCallable(F) is false, throw a TypeError exception.
features: [Promise.any, Symbol.iterator, Symbol, computed-property-names]
flags: [async]
--- |
1506 |
iter-next-val-err-no-close.js |
---
esid: sec-promise.any
description: >
Error when accessing an iterator result's `value` property (not closing
iterator)
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
If result is an abrupt completion, then
If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
IfAbruptRejectPromise(result, promiseCapability).
...
Runtime Semantics: PerformPromiseAny
...
Repeat
Let nextValue be IteratorValue(next).
If nextValue is an abrupt completion, set iteratorRecord.[[Done]] to true.
ReturnIfAbrupt(nextValue).
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
1569 |
iter-next-val-err-reject.js |
---
esid: sec-promise.any
description: >
Error when accessing an iterator result's `value` property (rejecting
promise)
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
If result is an abrupt completion, then
If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
IfAbruptRejectPromise(result, promiseCapability).
...
Runtime Semantics: PerformPromiseAny
...
Repeat
Let nextValue be IteratorValue(next).
If nextValue is an abrupt completion, set iteratorRecord.[[Done]] to true.
ReturnIfAbrupt(nextValue).
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
1441 |
iter-returns-false-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns false
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
921 |
iter-returns-null-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns null
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
919 |
iter-returns-number-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns number
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
917 |
iter-returns-string-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns string
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
918 |
iter-returns-symbol-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns symbol
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
924 |
iter-returns-true-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns true
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
918 |
iter-returns-undefined-reject.js |
---
esid: sec-promise.any
description: >
Reject when argument's Symbol.iterator returns undefined
info: |
...
Let iteratorRecord be GetIterator(iterable).
IfAbruptRejectPromise(iteratorRecord, promiseCapability).
...
GetIterator ( obj [ , hint [ , method ] ] )
...
Let iterator be ? Call(method, obj).
If Type(iterator) is not Object, throw a TypeError exception.
...
features: [Promise.any, Symbol.iterator]
flags: [async]
--- |
928 |
iter-step-err-no-close.js |
---
esid: sec-promise.any
description: >
Error when advancing the provided iterable (not closing iterator)
info: |
Promise.any ( iterable )
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
a. Let next be IteratorStep(iteratorRecord).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
flags: [async]
features: [Promise.any, Symbol.iterator, computed-property-names, Symbol, arrow-function]
--- |
1505 |
iter-step-err-reject.js |
---
esid: sec-promise.any
description: >
Error when advancing the provided iterable (rejecting promise)
info: |
Promise.any ( iterable )
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
a. Let next be IteratorStep(iteratorRecord).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
flags: [async]
features: [Promise.any, Symbol.iterator, computed-property-names, Symbol, arrow-function]
--- |
1440 |
length.js |
---
esid: sec-promise.any
description: Promise.any `length` property
info: |
ES 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]
features: [Promise.any]
--- |
908 |
name.js |
---
esid: sec-promise.any
description: Promise.any `name` property
info: |
ES 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]
features: [Promise.any]
--- |
888 |
new-reject-function.js |
---
esid: sec-performpromiseany
description: >
Each Promise.any element is called with a new Promise.any Reject Element function.
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
...
k. Let rejectElement be ! CreateBuiltinFunction(steps, « [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] »).
...
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
...
features: [Promise.any]
--- |
1439 |
not-a-constructor.js |
---
esid: sec-ecmascript-standard-built-in-objects
description: >
Promise.any does not implement [[Construct]], is not new-able
info: |
ECMAScript Function 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.
sec-evaluatenew
...
7. If IsConstructor(constructor) is false, throw a TypeError exception.
...
includes: [isConstructor.js]
features: [Reflect.construct, Promise.any, arrow-function]
--- |
882 |
prop-desc.js |
---
esid: sec-promise.any
description: Promise.any property descriptor
info: |
ES 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]
features: [Promise.any]
--- |
611 |
reject-all-mixed.js |
---
esid: sec-promise.any
description: >
Promise.any rejection reasons from various rejections are all present
flags: [async]
features: [Promise.any, arrow-function]
--- |
758 |
reject-deferred.js |
---
esid: sec-promise.any
description: Rejecting through deferred invocation of the provided resolving function
info: |
...
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
...
flags: [async]
features: [AggregateError, Promise.any, arrow-function]
--- |
883 |
reject-element-function-extensible.js |
---
esid: sec-promise.any-reject-element-functions
description: The [[Extensible]] slot of Promise.any Reject 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.
features: [Promise.any]
--- |
829 |
reject-element-function-length.js |
---
esid: sec-promise.any-reject-element-functions
description: The `length` property of Promise.any Reject Element functions
info: |
The length property of a Promise.any Reject 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]
features: [Promise.any]
--- |
1116 |
reject-element-function-name.js |
---
esid: sec-promise.any-reject-element-functions
description: The `name` property of Promise.any Reject 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, has a `name`
property whose value is a String. Functions that are identified as
anonymous functions use the empty string as the value of the `name`
property.
Unless otherwise specified, the `name` property of a built-in function
object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*,
[[Configurable]]: *true* }.
includes: [propertyHelper.js]
features: [Promise.any]
--- |
1285 |
reject-element-function-nonconstructor.js |
---
esid: sec-promise.any-reject-element-functions
description: Promise.any Reject 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.
features: [Promise.any]
--- |
1024 |
reject-element-function-property-order.js |
---
esid: sec-createbuiltinfunction
description: Promise.any resolve element function property order
info: |
Set order: "length", "name"
features: [Promise.any]
--- |
904 |
reject-element-function-prototype.js |
---
esid: sec-promise.any-reject-element-functions
description: The [[Prototype]] of Promise.any Reject 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.
features: [Promise.any]
--- |
991 |
reject-from-same-thenable.js |
---
description: Rejecting with a non-thenable object value
esid: sec-promise.any
info: |
PerformPromiseAny
Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] + 1.
Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
Promise.any Reject Element Functions
Let alreadyCalled be F.[[AlreadyCalled]].
If alreadyCalled.[[Value]] is true, return undefined.
Set alreadyCalled.[[Value]] to true.
...
features: [Promise.any]
--- |
1659 |
reject-ignored-deferred.js |
---
esid: sec-promise.any
description: >
Resolved promises ignore rejections through deferred invocation of the
provided resolving function
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
...
Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
8.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let error be a newly created AggregateError object.
2. Perform ! DefinePropertyOrThrow(error, "errors", Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: errors }).
3. Return ThrowCompletion(error).
...
Promise.any Reject Element Functions
...
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
...
flags: [async]
features: [Promise.any, arrow-function]
--- |
1821 |
reject-ignored-immed.js |
---
esid: sec-promise.any
description: >
Resolved promises ignore rejections through immediate invocation of the
provided resolving function
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
...
Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
8.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let error be a newly created AggregateError object.
2. Perform ! DefinePropertyOrThrow(error, "errors", Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: errors }).
3. Return ThrowCompletion(error).
...
Promise.any Reject Element Functions
...
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
...
flags: [async]
features: [Promise.any, arrow-function]
--- |
1482 |
reject-immed.js |
---
esid: sec-promise.any
description: Rejecting through immediate invocation of the provided resolving function
info: |
...
Let promiseCapability be NewPromiseCapability(C).
...
Let result be PerformPromiseAny(iteratorRecord, promiseCapability, C).
...
Runtime Semantics: PerformPromiseAny
...
8. Repeat
...
r. Perform ? Invoke(nextPromise, "then",
« resultCapability.[[Resolve]], rejectElement »).
Promise.any Reject Element Functions
...
6. Return RejectPromise(promise, reason).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1224 |
resolve-before-loop-exit-from-same.js |
---
esid: sec-promise.any
description: >
Cannot tamper remainingElementsCount when Promise.all resolve element function is called twice in a row.
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
...
Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
8.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let error be a newly created AggregateError object.
2. Perform ! DefinePropertyOrThrow(error, "errors", Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: errors }).
3. Return ThrowCompletion(error).
...
Promise.any Reject Element Functions
...
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
...
features: [Promise.any, arrow-function]
--- |
2896 |
resolve-before-loop-exit.js |
---
esid: sec-promise.any
description: >
Cannot tamper remainingElementsCount when two Promise.any Reject Element Function are called in succession.
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
...
Let remainingElementsCount be a new Record { [[value]]: 1 }.
...
8.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0,
1. Let error be a newly created AggregateError object.
2. Perform ! DefinePropertyOrThrow(error, "errors", Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: errors }).
3. Return ThrowCompletion(error).
...
Promise.any Reject Element Functions
...
Let alreadyCalled be the value of F's [[AlreadyCalled]] internal slot.
If alreadyCalled.[[value]] is true, return undefined.
Set alreadyCalled.[[value]] to true.
...
features: [Promise.any, arrow-function]
--- |
3154 |
resolve-from-reject-catch.js |
---
esid: sec-promise.any
description: >
Promise.any resolves with the first item that does not reject.
flags: [async]
features: [Promise.any, arrow-function]
--- |
606 |
resolve-from-resolve-reject-catch.js |
---
esid: sec-promise.any
description: >
Promise.any resolves with the first item that does not reject.
flags: [async]
features: [Promise.any, arrow-function]
--- |
623 |
resolve-from-same-thenable.js |
---
esid: sec-performpromiseany
description: >
Promise.any does not prevent resolve from being called multiple times.
features: [Promise.any, arrow-function]
includes: [promiseHelper.js]
--- |
1017 |
resolve-ignores-late-rejection-deferred.js |
---
description: >
Resolved promises ignore rejections through deferred invocation of the
provided resolving function
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
1020 |
resolve-ignores-late-rejection.js |
---
description: >
Resolved promises ignore rejections through immediate invocation of the
provided resolving function
esid: sec-promise.any
info: |
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
8. Repeat
...
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any, arrow-function]
--- |
889 |
resolve-non-callable.js |
---
esid: sec-promise.any
description: >
Promise.resolve is retrieved before GetIterator call (non-callable).
info: |
Promise.any ( iterable )
[...]
3. Let promiseResolve be GetPromiseResolve(C).
4. IfAbruptRejectPromise(promiseResolve, promiseCapability).
GetPromiseResolve ( promiseConstructor )
[...]
2. Let promiseResolve be ? Get(promiseConstructor, "resolve").
3. If IsCallable(promiseResolve) is false, throw a TypeError exception.
flags: [async]
features: [Promise.any, Symbol.iterator]
--- |
1016 |
resolve-non-thenable.js |
---
description: Resolving with a non-thenable object value
esid: sec-promise.any
info: |
PerformPromiseAny
Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] + 1.
Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
flags: [async]
features: [Promise.any]
--- |
686 |
resolve-not-callable-reject-with-typeerror.js |
---
esid: sec-promise.any
description: >
If the constructor's `resolve` method is not callable, reject with a TypeError.
info: |
Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
Runtime Semantics: PerformPromiseAny
Let promiseResolve be ? Get(constructor, "resolve").
If ! IsCallable(promiseResolve) is false, throw a TypeError exception.
flags: [async]
features: [Promise.any, arrow-function]
--- |
780 |
resolved-sequence-extra-ticks.js |
---
esid: sec-promise.any
description: Resolution ticks are set in a predictable sequence with extra then calls
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
Let remainingElementsCount be a new Record { [[Value]]: 1 }.
...
Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
If remainingElementsCount.[[Value]] is 0, then
Let error be a newly created AggregateError object.
Perform ! DefinePropertyOrThrow(error, "errors",
Property Descriptor {
[[Configurable]]: true,
[[Enumerable]]: false,
[[Writable]]: true,
[[Value]]: errors
}).
Return ? Call(promiseCapability.[[Reject]], undefined, « error »).
...
flags: [async]
includes: [promiseHelper.js]
features: [Promise.any]
--- |
1581 |
resolved-sequence-mixed.js |
---
esid: sec-promise.any
description: >
Resolution ticks are set in a predictable sequence of mixed fulfilled and rejected promises
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
Let remainingElementsCount be a new Record { [[Value]]: 1 }.
...
Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
If remainingElementsCount.[[Value]] is 0, then
Let error be a newly created AggregateError object.
Perform ! DefinePropertyOrThrow(error, "errors",
Property Descriptor {
[[Configurable]]: true,
[[Enumerable]]: false,
[[Writable]]: true,
[[Value]]: errors
}).
Return ? Call(promiseCapability.[[Reject]], undefined, « error »).
...
flags: [async]
includes: [promiseHelper.js]
features: [Promise.any]
--- |
1868 |
resolved-sequence-with-rejections.js |
---
esid: sec-promise.any
description: Resolution ticks are set in a predictable sequence
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
Let remainingElementsCount be a new Record { [[Value]]: 1 }.
...
Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
If remainingElementsCount.[[Value]] is 0, then
Let error be a newly created AggregateError object.
Perform ! DefinePropertyOrThrow(error, "errors",
Property Descriptor {
[[Configurable]]: true,
[[Enumerable]]: false,
[[Writable]]: true,
[[Value]]: errors
}).
Return ? Call(promiseCapability.[[Reject]], undefined, « error »).
...
flags: [async]
includes: [promiseHelper.js]
features: [Promise.any]
--- |
1829 |
resolved-sequence.js |
---
esid: sec-promise.any
description: Resolution ticks are set in a predictable sequence
info: |
Runtime Semantics: PerformPromiseAny ( iteratorRecord, constructor, resultCapability )
Let remainingElementsCount be a new Record { [[Value]]: 1 }.
...
6.d ...
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1.
iii. If remainingElementsCount.[[value]] is 0, then
Let error be a newly created AggregateError object.
Perform ! DefinePropertyOrThrow(error, "errors",
Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: errors }).
Return ThrowCompletion(error).
...
flags: [async]
includes: [promiseHelper.js]
features: [Promise.any]
--- |
1572 |
returns-promise.js |
---
esid: sec-promise.any
description: Promise.any returns a Promise
info: |
Promise.any ( iterable )
2. Let promiseCapability be ? NewPromiseCapability(C).
3. Let iteratorRecord be GetIterator(iterable).
4. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
5. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability).
6. If result is an abrupt completion, then
a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
b. IfAbruptRejectPromise(result, promiseCapability).
7. Return Completion(result).
features: [Promise.any]
--- |
887 |
shell.js |
|
0 |
species-get-error.js |
---
description: >
Promise.any() does not access a `Symbol.species` property of the `this` value
info: |
Let C be the this value.
Let promiseCapability be ? NewPromiseCapability(C).
...
features: [Promise.any, Symbol.species]
--- |
694 |