mirror of https://github.com/tc39/test262.git
async-iteration: add esid for 'esid: pending' tests
This commit is contained in:
parent
8add0d64b2
commit
0e99fa8a3a
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
|
||||
IsSimpleParameterList of UniqueFormalParameters is false.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a SyntaxError if FormalParameters contains arguments in strict mode.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is not a valid BindingIdentifier for AsyncGeneratorExpressions.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
If the source code matching this production is strict code, it is a
|
||||
Syntax Error if BindingIdentifier is the IdentifierName arguments.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
If the source code matching this production is strict code, it is a
|
||||
Syntax Error if BindingIdentifier is the IdentifierName eval.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a syntax error if AsyncGeneratorBody contains SuperCall is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a syntax error if AsyncGeneratorBody contains SuperProperty is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-strict-mode-of-ecmascript
|
||||
description: >
|
||||
It is a SyntaxError if FormalParameters contains eval in strict mode.
|
||||
negative:
|
||||
|
|
|
@ -3,10 +3,13 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a SyntaxError if BoundNames of FormalParameters also occurs in the
|
||||
LexicallyDeclaredNames of AsyncFunctionBody
|
||||
info: |
|
||||
It is a Syntax Error if any element of the BoundNames of FormalParameters
|
||||
also occurs in the LexicallyDeclaredNames of GeneratorBody.
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a SyntaxError if BoundNames of FormalParameters also occurs in the
|
||||
LexicallyDeclaredNames of AsyncFunctionBody
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a Syntax Error if FormalParameters Contains AwaitExpression is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: sec-identifiers
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is a reserved keyword within async generator function bodies and may
|
||||
not be used as the binding identifier of a parameter.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a syntax error if FormalParameters contains SuperCall is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a syntax error if FormalParameters contains SuperProperty is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
It is a Syntax Error if FormalParameters Contains YieldExpression is true.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: sec-identifiers
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`yield` is a reserved keyword within async generator function bodies and may
|
||||
not be used as the binding identifier of a parameter.
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: sec-identifiers
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is a reserved keyword within async generator function bodies and may
|
||||
not be used as a label.
|
||||
info: |
|
||||
BindingIdentifier : await
|
||||
|
||||
It is a Syntax Error if this production has an [Await] parameter.
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -3,10 +3,16 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: sec-identifiers
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`yield` is a reserved keyword within async generator function bodies and may
|
||||
not be used as a label.
|
||||
info: |
|
||||
BindingIdentifier : Identifier
|
||||
LabelIdentifier : Identifier
|
||||
|
||||
It is a Syntax Error if this production has an [Await] parameter and
|
||||
StringValue of Identifier is "await".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: prod-LeftHandSideExpression
|
||||
description: >
|
||||
Async generator function expressions are not a simple assignment target.
|
||||
negative:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-async-generator-function-definitions-static-semantics-early-errors
|
||||
description: >
|
||||
`yield` is not a valid BindingIdentifier for AsyncGeneratorExpressions.
|
||||
negative:
|
||||
|
|
|
@ -3,11 +3,21 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Generator is not resumed after a return type completion.
|
||||
Returning promise before start
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedStart", generator is closed without being resumed.
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Generator is not resumed after a return type completion.
|
||||
Returning non-promise before start
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedStart", generator is closed without being resumed.
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Generator is not resumed after a return type completion.
|
||||
Returning promise
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", generator is resumed and immediately closes the generator
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Returned generator suspended in a yield position resumes execution within
|
||||
an associated finally
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,12 +3,23 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Returned generator suspended in a yield position resumes execution
|
||||
within an associated finally, capturing a new abrupt completion and
|
||||
does not resume again within that finally block.
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Returned generator suspended in a yield position resumes execution within
|
||||
an associated finally.
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-return
|
||||
description: >
|
||||
Returned generator suspended in a yield position does not resume execution
|
||||
without an associated finally.
|
||||
info: |
|
||||
AsyncGenerator.prototype.return ( value )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is return, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", generator is resumed and immediately closes the generator
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Generator is not resumed after a throw completion with a promise arg before
|
||||
start
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedStart", generator is closed without being resumed.
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Generator is not resumed after a throw completion with a non-promise arg
|
||||
before start
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedStart", generator is closed without being resumed.
|
||||
|
|
|
@ -3,10 +3,21 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Generator is not resumed after a throw completion with a promise arg
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", generator is resumed and immediately and
|
||||
|
@ -36,7 +47,7 @@ it.next().then(function(ret) {
|
|||
assert.sameValue(ret.value, undefined, 'Generator is closed');
|
||||
assert.sameValue(ret.done, true, 'Generator is closed');
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
||||
}).catch($DONE);
|
||||
|
||||
}).catch($DONE);
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Thrown generator suspended in a yield position resumes execution within
|
||||
the associated catch-block
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
@ -40,7 +51,7 @@ it.next().then(function(ret) {
|
|||
assert.sameValue(ret.value, undefined, 'Generator is closed');
|
||||
assert.sameValue(ret.done, true, 'Generator is closed');
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
||||
}).catch($DONE);
|
||||
|
||||
}).catch($DONE);
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Thrown generator suspended in a yield position resumes execution within
|
||||
the associated finally block, returns and suspends execution again.
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,12 +3,23 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Thrown generator suspended in a yield position resumes execution within
|
||||
the associated finally block and throws an error and suspendeds execution
|
||||
again
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,11 +3,22 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Thrown generator suspended in a yield position resumes execution within
|
||||
the associated finally block.
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", and generator is resumed within a try-block with an
|
||||
|
|
|
@ -3,10 +3,21 @@
|
|||
|
||||
/*---
|
||||
author: Caitlin Potter <caitp@igalia.com>
|
||||
esid: pending
|
||||
esid: sec-asyncgenerator-prototype-throw
|
||||
description: >
|
||||
Generator is not resumed after a throw completion with an error object
|
||||
info: |
|
||||
AsyncGenerator.prototype.throw ( exception )
|
||||
1. Let generator be the this value.
|
||||
2. Let completion be Completion{[[Type]]: throw, [[Value]]: exception, [[Target]]: empty}.
|
||||
3. Return ! AsyncGeneratorEnqueue(generator, completion).
|
||||
|
||||
AsyncGeneratorEnqueue ( generator, completion )
|
||||
...
|
||||
8. If state is not "executing", then
|
||||
a. Perform ! AsyncGeneratorResumeNext(generator).
|
||||
...
|
||||
|
||||
AsyncGeneratorResumeNext:
|
||||
If completion.[[Type]] is throw, and generator.[[AsyncGeneratorState]] is
|
||||
"suspendedYield", generator is resumed and immediately and
|
||||
|
|
Loading…
Reference in New Issue