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

Unified Diff: runtime/vm/debugger.cc

Issue 1709383002: Improve behaviour when we hit a stack overflow / OOM error (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 06e788026781b828c52f60a0e7291ebd62a41adf..da5b2de843d4fc22558356f2f1518165b1be34b5 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -330,7 +330,9 @@ void Debugger::InvokeEventHandler(DebuggerEvent* event) {
// If we were paused, notify the service that we have resumed.
const Error& error =
Error::Handle(Thread::Current()->sticky_error());
- ASSERT(error.IsNull() || error.IsUnwindError());
+ ASSERT(error.IsNull() ||
+ error.IsUnwindError() ||
+ error.IsUnhandledException());
// Only send a resume event when the isolate is not unwinding.
if (!error.IsUnwindError()) {
@@ -1636,7 +1638,7 @@ Dart_ExceptionPauseInfo Debugger::GetExceptionPauseInfo() const {
bool Debugger::ShouldPauseOnException(DebuggerStackTrace* stack_trace,
- const Instance& exc) {
+ const Instance& exception) {
if (exc_pause_info_ == kNoPauseOnExceptions) {
return false;
}
@@ -1644,7 +1646,7 @@ bool Debugger::ShouldPauseOnException(DebuggerStackTrace* stack_trace,
return true;
}
ASSERT(exc_pause_info_ == kPauseOnUnhandledExceptions);
- ActivationFrame* handler_frame = stack_trace->GetHandlerFrame(exc);
+ ActivationFrame* handler_frame = stack_trace->GetHandlerFrame(exception);
if (handler_frame == NULL) {
// Did not find an exception handler that catches this exception.
// Note that this check is not precise, since we can't check
@@ -1673,8 +1675,9 @@ void Debugger::SignalExceptionThrown(const Instance& exc) {
}
DebuggerEvent event(isolate_, DebuggerEvent::kExceptionThrown);
event.set_exception(&exc);
- ASSERT(stack_trace->Length() > 0);
- event.set_top_frame(stack_trace->FrameAt(0));
+ if (stack_trace->Length() > 0) {
+ event.set_top_frame(stack_trace->FrameAt(0));
+ }
ASSERT(stack_trace_ == NULL);
stack_trace_ = stack_trace;
Pause(&event);
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698