Skip to content

Commit

Permalink
Don't allow construction of a WebAssembly.Exception object with the J…
Browse files Browse the repository at this point in the history
…S Tag
  • Loading branch information
dschuff committed Apr 11, 2024
1 parent d3c3ab6 commit 8834860
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,9 @@ The <dfn constructor for=Exception
lt="Exception(exceptionTag, payload, options)">new Exception(|exceptionTag|, |payload|, |options|)</dfn>
constructor steps are:

1. Let |JSTagAddr| be the result of [=get the JavaScript exception tag|getting the JavaScript exception tag=].
1. If |exceptionTag|.\[[Address]] is equal to |JSTagAddr|,
1. Throw a {{TypeError}}.
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
1. Let [|types|] → [] be [=tag_type=](|store|, |exceptionTag|.\[[Address]]).
1. If |types|'s [=list/size=] is not |payload|'s [=list/size=],
Expand Down

0 comments on commit 8834860

Please sign in to comment.