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

Unified Diff: runtime/vm/debugger.cc

Issue 14503003: Fix context-allocated variables in stack traces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/debugger.h ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 22069)
+++ runtime/vm/debugger.cc (working copy)
@@ -339,7 +339,7 @@
}
-RawContext* ActivationFrame::GetSavedContext() {
+RawContext* ActivationFrame::GetSavedContext(const Context& ctx) {
GetVarDescriptors();
intptr_t var_desc_len = var_descriptors_.Length();
for (int i = 0; i < var_desc_len; i++) {
@@ -349,8 +349,7 @@
return reinterpret_cast<RawContext*>(GetLocalVarValue(var_info.index));
}
}
- UNREACHABLE();
- return Context::null();
+ return ctx.raw();
}
@@ -883,7 +882,6 @@
Code& code = Code::Handle(isolate);
StackFrameIterator iterator(false);
StackFrame* frame = iterator.NextFrame();
- bool get_saved_context = false;
bool optimized_frame_found = false;
while (frame != NULL) {
ASSERT(frame->IsValid());
@@ -898,16 +896,12 @@
activation->SetContext(Context::Handle());
optimized_frame_found = true;
} else {
- if (get_saved_context) {
- ctx = activation->GetSavedContext();
- }
activation->SetContext(ctx);
+ ctx = activation->GetSavedContext(ctx);
}
stack_trace->AddActivation(activation);
- get_saved_context = activation->function().IsClosureFunction();
} else if (frame->IsEntryFrame()) {
ctx = reinterpret_cast<EntryFrame*>(frame)->SavedContext();
- get_saved_context = false;
}
frame = iterator.NextFrame();
}
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698