Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: src/wasm/wasm-module.cc

Issue 2132553002: [wasm] Use handles in wasm::GetDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/frames.cc ('K') | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« src/frames.cc ('K') | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698