Skip to content

Commit be736ea

Browse files
gahaasMs2ger
authored andcommitted
TypeError for Global constructor with v128
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.
1 parent d391957 commit be736ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

document/js-api/index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
916916
1. Let |mutable| be |descriptor|["mutable"].
917917
1. Let |valuetype| be [=ToValueType=](|descriptor|["value"]).
918918
1. If |valuetype| is [=v128=],
919-
1. Throw a {{LinkError}} exception.
919+
1. Throw a {{TypeError}} exception.
920920
1. If |v| is missing,
921921
1. Let |value| be [=DefaultValue=](|valuetype|).
922922
1. Otherwise,

0 commit comments

Comments
 (0)