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

Unified Diff: runtime/vm/stack_frame.cc

Issue 1830733002: Fix stub frame walking: when materializing the frame content during deoptimization, the stack is no… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 4eb3da7e0d6b94b8b256e9f66d641093e2f3fd6a..3b2b27d9a1fc89ea5da4f1558388917c1f723641 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -28,7 +28,13 @@ bool StackFrame::IsStubFrame() const {
NoSafepointScope no_safepoint;
#endif
RawCode* code = GetCodeObject();
- intptr_t cid = code->ptr()->owner_->GetClassId();
+ if (code == Code::null()) {
+ // Frame not yet set up properly (e.g,deoptimization).
+ // This is slow, but rare.
+ const Code& code = Code::Handle(Code::LookupCode(pc()));
+ return code.IsStubCode();
rmacnak 2016/03/23 19:44:19 assert code not null
srdjan 2016/03/23 19:48:22 Done.
+ }
+ const intptr_t cid = code->ptr()->owner_->GetClassId();
ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
return cid == kNullCid || cid == kClassCid;
}
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698