| Index: test/cctest/wasm/test-run-wasm-module.cc
|
| diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
|
| index 8449a52ff3bc0f7be4eea87b12795c7842d6a3f0..b5da55a0cba8d9807995885c66b6c598ddae2f0f 100644
|
| --- a/test/cctest/wasm/test-run-wasm-module.cc
|
| +++ b/test/cctest/wasm/test-run-wasm-module.cc
|
| @@ -256,3 +256,18 @@ TEST(Run_WasmModule_Serialization) {
|
| new_ctx->Exit();
|
| }
|
| }
|
| +
|
| +TEST(Run_WasmModule_GrowMemoryInIf) {
|
| + TestSignatures sigs;
|
| + v8::base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| + WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
|
| + uint16_t f_index = builder->AddFunction();
|
| + WasmFunctionBuilder* f = builder->FunctionAt(f_index);
|
| + f->SetSignature(sigs.i_v());
|
| + ExportAsMain(f);
|
| + byte code[] = {WASM_IF_ELSE(WASM_I32V(0), WASM_GROW_MEMORY(WASM_I32V(1)),
|
| + WASM_I32V(12))};
|
| + f->EmitCode(code, sizeof(code));
|
| + TestModule(&zone, builder, 12);
|
| +}
|
|
|