diff options
Diffstat (limited to 'js/src/jit-test/tests/wasm/gc/binary.js')
-rw-r--r-- | js/src/jit-test/tests/wasm/gc/binary.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/js/src/jit-test/tests/wasm/gc/binary.js b/js/src/jit-test/tests/wasm/gc/binary.js index 1ef4a586a8..e16af2bfbf 100644 --- a/js/src/jit-test/tests/wasm/gc/binary.js +++ b/js/src/jit-test/tests/wasm/gc/binary.js @@ -2,14 +2,16 @@ load(libdir + "wasm-binary.js"); -const v2vSig = {args:[], ret:VoidCode}; -const v2vSigSection = sigSection([v2vSig]); - function checkInvalid(body, errorMessage) { assertErrorMessage(() => new WebAssembly.Module( - moduleWithSections([v2vSigSection, declSection([0]), bodySection([body])])), - WebAssembly.CompileError, - errorMessage); + moduleWithSections([ + typeSection([ + { kind: FuncCode, args: [], ret: [] }, + ]), + declSection([0]), + bodySection([body]), + ]) + ), WebAssembly.CompileError, errorMessage); } const invalidRefBlockType = funcBody({locals:[], body:[ @@ -23,7 +25,7 @@ checkInvalid(invalidRefBlockType, /heap type/); const invalidTooBigRefType = funcBody({locals:[], body:[ BlockCode, OptRefCode, - varU32(1000000), + ...varU32(1000000), EndCode, ]}); checkInvalid(invalidTooBigRefType, /heap type/); |