Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index e789982ba8b58b75f469cab1f7d1dd7d11a849d7..b37d93c828118fd0f0d031d540537b6327476bb1 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -1906,6 +1906,12 @@ int32_t wasm::GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance, |
Handle<FixedArray> code_table = GetCompiledModule(*instance)->code_table(); |
RelocateMemoryReferencesInCode(code_table, old_mem_start, new_mem_start, |
old_size, new_size); |
+ Handle<Object> memory_object(instance->GetInternalField(kWasmMemObject), |
+ isolate); |
+ if (!memory_object->IsUndefined(isolate)) { |
+ WasmJs::SetWasmMemoryArrayBuffer(isolate, memory_object, buffer); |
+ } |
+ |
DCHECK(old_size % WasmModule::kPageSize == 0); |
return (old_size / WasmModule::kPageSize); |
} |