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

Unified Diff: runtime/vm/debugger.cc

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: remote two assertions which cannot be made Created 3 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
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 1d706220b8d3bc8bdcd199c53b2a282febcd60ad..adf09a37f8d9264a99fdf9a1fe83335bb090814f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1165,7 +1165,7 @@ void ActivationFrame::PrintContextMismatchError(intptr_t ctx_slot,
OS::PrintErr(
"-------------------------\n"
"All frames...\n\n");
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
rmacnak 2017/05/01 15:51:33 Here and elsewhere StackFrameIterator::kDontValid
kustermann 2017/05/02 07:11:18 Will make it an enum, same for the other boolean.
StackFrame* frame = iterator.NextFrame();
intptr_t num = 0;
while ((frame != NULL)) {
@@ -1848,7 +1848,7 @@ DebuggerStackTrace* Debugger::CollectStackTrace() {
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
DebuggerStackTrace* stack_trace = new DebuggerStackTrace(8);
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
Code& code = Code::Handle(zone);
Code& inlined_code = Code::Handle(zone);
Array& deopt_frame = Array::Handle(zone);
@@ -1934,7 +1934,7 @@ DebuggerStackTrace* Debugger::CollectAsyncCausalStackTrace() {
// asynchronous function. We truncate the remainder of the synchronous
// stack trace because it contains activations that are part of the
// asynchronous dispatch mechanisms.
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
StackFrame* frame = iterator.NextFrame();
while (synchronous_stack_trace_length > 0) {
ASSERT(frame != NULL);
@@ -1997,7 +1997,8 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
Isolate* isolate = thread->isolate();
DebuggerStackTrace* stack_trace = new DebuggerStackTrace(8);
- StackFrameIterator iterator(StackFrameIterator::kDontValidateFrames);
+ StackFrameIterator iterator(StackFrameIterator::kDontValidateFrames,
+ Thread::Current(), false);
Code& code = Code::Handle(zone);
Smi& offset = Smi::Handle(zone);
@@ -2131,7 +2132,7 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
ActivationFrame* Debugger::TopDartFrame() const {
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
StackFrame* frame = iterator.NextFrame();
while ((frame != NULL) && !frame->IsDartFrame()) {
frame = iterator.NextFrame();
@@ -3344,7 +3345,7 @@ void Debugger::HandleSteppingRequest(DebuggerStackTrace* stack_trace,
OS::PrintErr(
"-------------------------\n"
"All frames...\n\n");
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
StackFrame* frame = iterator.NextFrame();
intptr_t num = 0;
while ((frame != NULL)) {
@@ -3466,7 +3467,7 @@ void Debugger::RewindToFrame(intptr_t frame_index) {
Function& function = Function::Handle(zone);
// Find the requested frame.
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
intptr_t current_frame = 0;
for (StackFrame* frame = iterator.NextFrame(); frame != NULL;
frame = iterator.NextFrame()) {
@@ -3568,7 +3569,7 @@ void Debugger::RewindPostDeopt() {
OS::PrintErr(
"-------------------------\n"
"All frames...\n\n");
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
StackFrame* frame = iterator.NextFrame();
intptr_t num = 0;
while ((frame != NULL)) {
@@ -3581,7 +3582,7 @@ void Debugger::RewindPostDeopt() {
Zone* zone = thread->zone();
Code& code = Code::Handle(zone);
- StackFrameIterator iterator(false);
+ StackFrameIterator iterator(false, Thread::Current(), false);
intptr_t current_frame = 0;
for (StackFrame* frame = iterator.NextFrame(); frame != NULL;
frame = iterator.NextFrame()) {

Powered by Google App Engine
This is Rietveld 408576698