In the current js-api (v2) spec draft, the getArg method on WebAssembly.Exception is defined asgetArg(unsigned long index), not requiring a tag:
|
any getArg([EnforceRange] unsigned long index); |
|
The <dfn method for="Exception">getArg(|index|)</dfn> method steps are: |
|
|
|
1. Let |store| be the [=surrounding agent=]'s [=associated store=]. |
|
1. Let |tagaddr| be [=exn_tag=](|store|, **this**.\[[Address]]). |
|
1. Let |payload| be [=exn_read=](|store|, **this**.\[[Address]]). |
|
1. Assert: |tagaddr| is equal to **this**.\[[Type]]. |
|
1. If |index| ≥ |payload|'s [=list/size=], |
|
1. Throw a {{RangeError}}. |
|
1. Let [|types|] → [] be [=tag_type=](|store|, |tagaddr|). |
|
1. If |types|[|index|] [=matches/valtype|matches=] [=v128=] or [=exnref=], |
|
1. Throw a {{TypeError}}. |
|
1. Return [=ToJSValue=](|payload|[|index|]). |
This does not align with the description in Exceptions.md and current browser implementations that expect a Tag argument:
|
any getArg(Tag tag, unsigned long index); |
|
to query if the `Exception` matches a given tag. The `getArg` method allows |
|
access to the data fields of a `Exception` if a matching tag is given. This last |
It's not entirely clear to me if this is a spec bug or an intentional change that has not been adopted in implementations yet. Either way, one of the two documents needs to be fixed.
In the current js-api (v2) spec draft, the
getArgmethod onWebAssembly.Exceptionis defined asgetArg(unsigned long index), not requiring a tag:spec/document/js-api/index.bs
Line 1686 in 1d3e26f
spec/document/js-api/index.bs
Lines 1754 to 1765 in 1d3e26f
This does not align with the description in Exceptions.md and current browser implementations that expect a
Tagargument:spec/proposals/exception-handling/Exceptions.md
Line 279 in 1d3e26f
spec/proposals/exception-handling/Exceptions.md
Lines 236 to 237 in 1d3e26f
It's not entirely clear to me if this is a spec bug or an intentional change that has not been adopted in implementations yet. Either way, one of the two documents needs to be fixed.