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

Side by Side Diff: runtime/vm/debugger.cc

Issue 1636083002: Improve Observatory debugger behaviour when an isolate exits with unhandled exceptions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 } 1621 }
1622 1622
1623 1623
1624 void Debugger::SignalExceptionThrown(const Instance& exc) { 1624 void Debugger::SignalExceptionThrown(const Instance& exc) {
1625 // We ignore this exception event when the VM is executing code invoked 1625 // We ignore this exception event when the VM is executing code invoked
1626 // by the debugger to evaluate variables values, when we see a nested 1626 // by the debugger to evaluate variables values, when we see a nested
1627 // breakpoint or exception event, or if the debugger is not 1627 // breakpoint or exception event, or if the debugger is not
1628 // interested in exception events. 1628 // interested in exception events.
1629 if (ignore_breakpoints_ || 1629 if (ignore_breakpoints_ ||
1630 IsPaused() || 1630 IsPaused() ||
1631 (!HasDebugEventHandler()) ||
1632 (exc_pause_info_ == kNoPauseOnExceptions)) { 1631 (exc_pause_info_ == kNoPauseOnExceptions)) {
1633 return; 1632 return;
1634 } 1633 }
1635 DebuggerStackTrace* stack_trace = CollectStackTrace(); 1634 DebuggerStackTrace* stack_trace = CollectStackTrace();
1636 if (!ShouldPauseOnException(stack_trace, exc)) { 1635 if (!ShouldPauseOnException(stack_trace, exc)) {
1637 return; 1636 return;
1638 } 1637 }
1639 DebuggerEvent event(isolate_, DebuggerEvent::kExceptionThrown); 1638 DebuggerEvent event(isolate_, DebuggerEvent::kExceptionThrown);
1640 event.set_exception(&exc); 1639 event.set_exception(&exc);
1641 ASSERT(stack_trace->Length() > 0); 1640 ASSERT(stack_trace->Length() > 0);
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 } 3253 }
3255 3254
3256 3255
3257 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 3256 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
3258 ASSERT(bpt->next() == NULL); 3257 ASSERT(bpt->next() == NULL);
3259 bpt->set_next(code_breakpoints_); 3258 bpt->set_next(code_breakpoints_);
3260 code_breakpoints_ = bpt; 3259 code_breakpoints_ = bpt;
3261 } 3260 }
3262 3261
3263 } // namespace dart 3262 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698