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
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1171,7 +1171,7 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1171
1171
1. Let |args| be the result of [=coerce JavaScript arguments|coercing arguments=] (|functype|,|argValues|).
1172
1172
1. Let (|store|, |ret|) be the result of [=func_invoke=](|store|, |funcaddr|, |args|).
1173
1173
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1174
-
1. If |ret| is [=error=], throw an exception. This exception should be a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.
1174
+
1. If |ret| 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>.
1175
1175
1. If |ret| is [=THROW=][=ref.exn=] |exnaddr|, then:
1176
1176
1. Let |tagaddr| be [=exn_tag=](|store|, |exnaddr|).
1177
1177
1. Let |payload| be [=exn_read=](|store|, |exnaddr|).
@@ -1438,7 +1438,7 @@ interface Suspending {
1438
1438
1. Add an entry mapping |ec| to [=active=] in |map|.
1439
1439
1. Let (|store|, |result|) be the result of [=func_invoke=](|store|, |funcaddr|, |args|).
1440
1440
1. Assert: If control reaches here, we have done waiting for suspended imports.
1441
-
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
+
1. If the entry for |ec| in |map| is not [=active=] then throw a WebAssembly {{SuspendError}} exception. Otherwise, remove the entry for |ec| from [=map=].
1442
1442
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1443
1443
1. If |result| is [=error=], throw a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.
1444
1444
1. Otherwise, if |result| is of the form [=throw=] exnaddr,
@@ -1477,7 +1477,7 @@ To <dfn>create a suspending function</dfn> from a JavaScript function |func|, wi
1477
1477
1. Let |async_context| be the [=surrounding agent=]'s [=running execution context=].
1478
1478
1. Let |map| be the [=surrounding agent=]'s associated [=Execution Context Status map=].
1479
1479
1. If the entry for |async_context| in |map| is not [=active=], then:
1480
-
1. Perform [=throw a JavaScript exception=] with a {{RuntimeError}} exception.
1480
+
1. Perform [=throw a JavaScript exception=] with a {{SuspendError}} exception.
1481
1481
1. [=Prepare to run script=] with |relevant settings|.
1482
1482
1. [=Prepare to run a callback=] with |stored settings|.
1483
1483
1. Let [|parameters|] → [|resultTypes|] be |functype|.
@@ -1812,19 +1812,19 @@ To <dfn>get the JavaScript exception tag</dfn>, perform the following steps:
1812
1812
1813
1813
<h3 id="error-objects">Error Objects</h3>
1814
1814
1815
-
WebAssembly defines the following Error classes: <dfn exception>CompileError</dfn>, <dfn exception>LinkError</dfn>, and <dfn exception>RuntimeError</dfn>.
1815
+
WebAssembly defines the following Error classes: <dfn exception>CompileError</dfn>, <dfn exception>LinkError</dfn>, <dfn exception>RuntimeError</dfn>, and <dfn exception>SuspendError</dfn>.
1816
1816
1817
1817
<div algorithm="create the WebAssembly namespace object">
1818
1818
When the [=namespace object=] for the {{WebAssembly}} namespace is [=create a namespace object|created=], the following steps must be run:
1819
1819
1820
1820
1. Let |namespaceObject| be the [=namespace object=].
1821
-
1. [=list/iterate|For each=] |error| of « "CompileError", "LinkError", "RuntimeError" »,
Note: This defines {{CompileError}}, {{LinkError}}, and {{RuntimeError}} classes on the {{WebAssembly}} namespace, which are produced by the APIs defined in this specification.
1827
+
Note: This defines {{CompileError}}, {{LinkError}}, {{RuntimeError}}, and {{SuspendError}} classes on the {{WebAssembly}} namespace, which are produced by the APIs defined in this specification.
1828
1828
They expose the same interface as native JavaScript errors like {{TypeError}} and {{RangeError}}.
1829
1829
1830
1830
Note: It is not currently possible to define this behavior using Web IDL.
0 commit comments