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
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: document/js-api/index.bs
+36-7Lines changed: 36 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1043,11 +1043,11 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1043
1043
1. Note: The expectation is that [=func_invoke=] will be updated to return (|store|, <var ignore>val</var>* | [=error=] | (exception |exntag| |payload|)).
1044
1044
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1045
1045
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>.
1046
-
1. If |ret| is exception |exntag| |payload|, then
1046
+
1. If |ret| is exception |exntag| |payload| |opaqueData|, then
1047
1047
1. If |exntag| is the [=JavaScript exception tag=], then
1048
1048
1. Let « [=ref.extern=] |externaddr| » be |payload|.
1049
1049
1. Throw the result of [=retrieving an extern value=] from |externaddr|.
1050
-
1. Let |exception| be [=create an Exception object|a new Exception=] for |exntag|and |payload|.
1050
+
1. Let |exception| be [=create an Exception object|a new Exception=] for |exntag|, |payload| and |opaqueData|.
1051
1051
1. Throw |exception|.
1052
1052
1. Let |outArity| be the [=list/size=] of |ret|.
1053
1053
1. If |outArity| is 0, return undefined.
@@ -1105,10 +1105,16 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1105
1105
1. If |v| [=implements=]{{Exception}},
1106
1106
1. Let |type| be |v|.\[[Type]].
1107
1107
1. Let |payload| be |v|.\[[Payload]].
1108
+
1. If |v|.\[[Stack]] is undefined,
1109
+
1. Let |opaqueValue| be [=ref.null=][=externref=].
1110
+
1. Otherwise,
1111
+
1. Assert: [=Type=](|v|.\[[Stack]]) is String.
1112
+
1. Let |opaqueValue| be [=ToWebAssemblyValue=](|v|.\[[Stack]], [=externref=])
1108
1113
1. Otherwise,
1109
1114
1. Let |type| be the [=JavaScript exception tag=].
1110
1115
1. Let |payload| be [=ToWebAssemblyValue=](|v|, [=externref=]).
1111
-
1. [=WebAssembly/Throw=] with |type| and |payload|.
1116
+
1. Let |opaqueValue| be [=ref.null=][=externref=].
1117
+
1. [=WebAssembly/Throw=] with |type|, |payload| and |opaqueValue|.
1112
1118
1. Otherwise, return |result|.\[[Value]].
1113
1119
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
1114
1120
1. Let (|store|, |funcaddr|) be [=func_alloc=](|store|, |functype|, |hostfunc|).
@@ -1258,20 +1264,25 @@ Advisement: This method is only expected to be implemented or shipped when both
0 commit comments