You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_asyncBody_: a Parse Node <ins>or an Abstract Closure with no parameters</ins>,
57
-
_asyncContext_: an execution context,
58
-
)
59
-
</h1>
60
-
<dlclass="header">
61
-
</dl>
62
-
<emu-alg>
63
-
1.Assert:_promiseCapability_ is a PromiseCapability Record.
64
-
1. Let _runningContext_ be the running execution context.
65
-
1.[fence-effects="user-code"] Set the code evaluation state of _asyncContext_ such that when evaluation is resumed for that execution context the following steps will be performed:
66
-
1. <ins> If _asyncBody_ is a Parse Node, then</ins>
67
-
1. <ins> Let _result_ be the result of evaluating _asyncBody_.</ins>
68
-
1. <ins> Else, </ins>
69
-
1. <ins> Assert: _asyncBody_ is an Abstract Closure with no parameters.</ins>
70
-
1. <ins> Let _result_ be _asyncBody_().</ins>
71
-
1. <del>Let _result_ be the result of evaluating _asyncBody_. </del>
72
-
1.Assert: If we return here, the async function either threw an exception or performed an implicit or explicit return; all awaiting is done.
73
-
1. Remove _asyncContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context.
1. Push _asyncContext_ onto the execution context stack; _asyncContext_ is now the running execution context.
83
-
1. <emu-metaeffects="user-code">Resume the suspended evaluation of _asyncContext_</emu-meta>. Let _result_ be the value returned by the resumed computation.
84
-
1.Assert: When we return here, _asyncContext_ has already been removed from the execution context stack and _runningContext_ is the currently running execution context.
85
-
1.Assert:_result_ is a normal completion with a value of *undefined*. The possible sources of completion values are Await or, if the async function doesn't await anything, step <emu-xrefhref="#step-asyncblockstart-return-undefined"></emu-xref> above.
0 commit comments