Index: test/mjsunit/wasm/wasm-module-builder.js |
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js |
index 68de66bf4a530277a249412e7603a8beac196ea1..334a8a14b8e29281e37bae574e5f9add01970c6f 100644 |
--- a/test/mjsunit/wasm/wasm-module-builder.js |
+++ b/test/mjsunit/wasm/wasm-module-builder.js |
@@ -97,6 +97,9 @@ class WasmFunctionBuilder { |
} |
addBody(body) { |
+ for (let b of body) { |
+ if (typeof b != 'number') throw new Error("invalid body"); |
+ } |
this.body = body; |
// Automatically add the end for the function block to the body. |
body.push(kExprEnd); |