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
Copy file name to clipboardExpand all lines: document/js-api/index.bs
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1251,7 +1251,7 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1251
1251
1. If |result|.\[[Type]] is <emu-const>normal</emu-const>, then:
1252
1252
1. Return the result of performing [=coerce a JavaScript return=] on |resultTypes| and |ret|.
1253
1253
1. If |result|.\[[Type]] is <emu-const>throw</emu-const>, then:
1254
-
1. Perform [=throw a JavaScript exception|throw the JavaScript exception=] |result|.\[[Value]].
1254
+
1. Perform [=throw a JavaScript exception|throw the JavaScript exception=]on |result|.\[[Value]].
1255
1255
1. Let (|store|, |funcaddr|) be [=func_alloc=](|store|, |functype|, |hostfunc|).
1256
1256
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1257
1257
1. Return |funcaddr|.
@@ -1439,7 +1439,7 @@ interface Suspending {
1439
1439
1. Assert: If control reaches here, we have done waiting for suspended imports.
1440
1440
1. If the entry for |ec| in |map| is not [=active=] then throw a WebAssembly {{RuntimeError}} exception. Otherwise, remove the entry for |ec| from [=map=].
1441
1441
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1442
-
1. If |result| is [=error=], throw an exception. This exception must be a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.
1442
+
1. If |result| is [=error=], throw a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.
1443
1443
1. Otherwise, if |result| is of the form [=throw=] exnaddr,
1444
1444
1. [=Reject=] |promise| with |result|.
1445
1445
1. Otherwise,
@@ -1476,8 +1476,7 @@ To <dfn>create a suspending function</dfn> from a JavaScript function |func|, wi
1476
1476
1. Let |async_context| be the [=surrounding agent=]'s [=running execution context=].
1477
1477
1. Let |map| be the [=surrounding agent=]'s associated [=Execution Context Status map=].
1478
1478
1. If the entry for |async_context| in |map| is not [=active=], then:
1479
-
1. Let |type|, |payload| and |opaqueData| be the result of [=coerce a JavaScript exception|coercing the JavaScript exception=]{{RuntimeError}}.
1480
-
1. [=WebAssembly/Throw=] with |type|, |payload| and |opaqueData|.
1479
+
1. Perform [=throw a JavaScript exception=] with a {{RuntimeError}} exception.
1481
1480
1. [=Prepare to run script=] with |relevant settings|.
1482
1481
1. [=Prepare to run a callback=] with |stored settings|.
1483
1482
1. Let [|parameters|] → [|resultTypes|] be |functype|.
@@ -1496,8 +1495,7 @@ To <dfn>create a suspending function</dfn> from a JavaScript function |func|, wi
1496
1495
1. Note: We only invoke [$Await$] if the call to |func| has returned a Promise object.
1497
1496
1. Note: This will suspend both this algorithm, and the WebAssembly function being invoked by the [=evaluate a Promising function=] algorithm. On return, |ret| will be either a normal completion or a throw completion.
1498
1497
1. If the entry for |async_context| in |map| is not [=paused=] then:
1499
-
1. Let |type|, |payload| and |opaqueData| be the result of [=coerce a JavaScript exception|coercing the JavaScript exception=]{{RuntimeError}}.
1500
-
1. [=WebAssembly/Throw=] with |type|, |payload| and |opaqueData|.
1498
+
1. Perform [=throw a JavaScript exception=] with a {{RuntimeError}}.
1501
1499
1. Otherwise, set the entry to [=active=].
1502
1500
1. If |awaitResult|.\[[Type]] is <emu-const>throw</emu-const>, then:
1503
1501
1. Let |type|, |payload| and |opaqueData| be the result of [=coerce a JavaScript exception|coercing the JavaScript exception=] |ret|.\[[Value]].
0 commit comments