Index: src/wasm/module-compiler.cc |
diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc |
index b24640239ad362bf1a7640688f5ab7c946602936..3a988e69962eb31e3e9ddd5b1ea144ce1a654b35 100644 |
--- a/src/wasm/module-compiler.cc |
+++ b/src/wasm/module-compiler.cc |
@@ -1022,9 +1022,9 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() { |
//-------------------------------------------------------------------------- |
// Add instance to Memory object |
//-------------------------------------------------------------------------- |
- DCHECK(instance->IsWasmInstanceObject()); |
if (instance->has_memory_object()) { |
- instance->memory_object()->AddInstance(isolate_, instance); |
+ Handle<WasmMemoryObject> memory(instance->memory_object(), isolate_); |
+ WasmMemoryObject::AddInstance(isolate_, memory, instance); |
} |
//-------------------------------------------------------------------------- |
@@ -1667,7 +1667,6 @@ void InstanceBuilder::ProcessExports( |
} else { |
memory_object = |
Handle<WasmMemoryObject>(instance->memory_object(), isolate_); |
- memory_object->ResetInstancesLink(isolate_); |
} |
desc.set_value(memory_object); |