Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index bd371c0c50819ad5def070357e54b9951ea8de11..b5b0235fa563a277b748949aa9b2d6f97121ec8c 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -740,7 +740,8 @@ void WebAssemblyMemoryGrow(const v8::FunctionCallbackInfo<v8::Value>& args) { |
thrower.RangeError("Unable to grow instance memory."); |
return; |
} |
- i::wasm::DetachWebAssemblyMemoryBuffer(i_isolate, old_buffer); |
+ bool free_memory = (delta_size != 0); |
+ i::wasm::DetachWebAssemblyMemoryBuffer(i_isolate, old_buffer, free_memory); |
v8::ReturnValue<v8::Value> return_value = args.GetReturnValue(); |
return_value.Set(ret); |
} |