Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 68254a125576f734d0181117cbfcacee22d6e1a0..5259dfe15d79a7748eaf521f7ec32580c45a96e4 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -1278,12 +1278,14 @@ SeqOneByteString* GetWasmBytes(JSObject* wasm) { |
return SeqOneByteString::cast(wasm->GetInternalField(kWasmModuleBytesString)); |
} |
-WasmDebugInfo* GetDebugInfo(JSObject* wasm) { |
- Object* info = wasm->GetInternalField(kWasmDebugInfo); |
- if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); |
- Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); |
+Handle<WasmDebugInfo> GetDebugInfo(Handle<JSObject> wasm) { |
+ Handle<Object> info(wasm->GetInternalField(kWasmDebugInfo), |
+ wasm->GetIsolate()); |
+ if (!info->IsUndefined(wasm->GetIsolate())) |
+ return Handle<WasmDebugInfo>::cast(info); |
+ Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(wasm); |
wasm->SetInternalField(kWasmDebugInfo, *new_info); |
- return *new_info; |
+ return new_info; |
} |
bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start, |