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

Unified Diff: src/frames.cc

Issue 2384183002: [wasm] cleanup wasm-module.cc (Closed)
Patch Set: [wasm] cleanup wasm-module.cc Created 4 years, 2 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
« no previous file with comments | « no previous file | src/runtime/runtime-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 470601e5b4b407bb6b05e4c377b2d458728684ac..c67fdc2d94fdd5e524890be41c56a6c377471d47 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1461,8 +1461,9 @@ Address WasmFrame::GetCallerStackPointer() const {
}
Object* WasmFrame::wasm_obj() const {
- return wasm::GetOwningWasmInstance(*isolate()->factory()->undefined_value(),
- LookupCode());
+ Object* ret = wasm::GetOwningWasmInstance(LookupCode());
+ if (ret == nullptr) ret = *(isolate()->factory()->undefined_value());
+ return ret;
}
uint32_t WasmFrame::function_index() const {
« no previous file with comments | « no previous file | src/runtime/runtime-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698