Index: runtime/vm/debugger.cc |
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
index e8e8af4633b2c7ee8887e86703530d4a1c989d4d..5ed19b4dba26841dfd00fed92e3fc908d67b9d85 100644 |
--- a/runtime/vm/debugger.cc |
+++ b/runtime/vm/debugger.cc |
@@ -1277,6 +1277,12 @@ Debugger::~Debugger() { |
void Debugger::Shutdown() { |
+ // TODO(johnmccutchan): Do not create a debugger for isolates that don't need |
+ // them. Then, assert here that isolate_ is not one of those isolates. |
+ if ((isolate_ == Dart::vm_isolate()) || |
+ ServiceIsolate::IsServiceIsolateDescendant(isolate_)) { |
+ return; |
+ } |
while (breakpoint_locations_ != NULL) { |
BreakpointLocation* bpt = breakpoint_locations_; |
breakpoint_locations_ = breakpoint_locations_->next(); |
@@ -1294,9 +1300,7 @@ void Debugger::Shutdown() { |
delete bpt; |
} |
// Signal isolate shutdown event. |
- if (!ServiceIsolate::IsServiceIsolateDescendant(isolate_)) { |
- SignalIsolateEvent(DebuggerEvent::kIsolateShutdown); |
- } |
+ SignalIsolateEvent(DebuggerEvent::kIsolateShutdown); |
} |