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 { |