Skip to content

Commit

Permalink
TypeError for Global constructor with v128
Browse files Browse the repository at this point in the history
At the moment the spec requires a `LinkError` to be thrown when the `WebAssembly.Global` constructor is called for type `v128`. This was introduced in WebAssembly/simd#360, but according to the PR description, actually a `TypeError` should be thrown. The PR refers to https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#javascript-api-and-simd-values, and there a `TypeError` is required.
  • Loading branch information
gahaas authored and rossberg committed Mar 1, 2023
1 parent 4534a03 commit 684d625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
1. Let |mutable| be |descriptor|["mutable"].
1. Let |valuetype| be [=ToValueType=](|descriptor|["value"]).
1. If |valuetype| is [=v128=],
1. Throw a {{LinkError}} exception.
1. Throw a {{TypeError}} exception.
1. If |v| is missing,
1. Let |value| be [=DefaultValue=](|valuetype|).
1. Otherwise,
Expand Down

0 comments on commit 684d625

Please sign in to comment.