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

Unified Diff: runtime/vm/debugger.cc

Issue 1406013004: Fixes shutdown crashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 2 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 | « no previous file | runtime/vm/service_isolate.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 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);
}
« no previous file with comments | « no previous file | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698