diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc index 6449822f40..a4bfa4826f 100644 --- a/src/wasm/wasm-objects.cc +++ b/src/wasm/wasm-objects.cc @@ -965,7 +965,7 @@ void WasmCompiledModule::Reset(Isolate* isolate, Zone specialization_zone(isolate->allocator(), ZONE_NAME); CodeSpecialization code_specialization(isolate, &specialization_zone); - if (old_mem_size > 0 && old_mem_start != nullptr) { + if (old_mem_size != default_mem_size || old_mem_start != nullptr) { code_specialization.RelocateMemoryReferences(old_mem_start, old_mem_size, nullptr, default_mem_size); }