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 b32fd3bf053a7c0ad5c66e8c3dc651513b7df551..d7bf9a67c881c9a677711ba98a930e112712beae 100644 |
--- a/test/mjsunit/wasm/wasm-module-builder.js |
+++ b/test/mjsunit/wasm/wasm-module-builder.js |
@@ -98,6 +98,8 @@ class WasmFunctionBuilder { |
addBody(body) { |
this.body = body; |
+ // Automatically add the end for the function block to the body. |
+ body.push(kExprEnd); |
return this; |
} |