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

Unified Diff: runtime/vm/debugger.cc

Issue 1415603013: Add creation message flag to Debugger (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/vm/debugger.h ('k') | no next file » | 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 2c4d54bf04c0bd6dbd76796dab0c00c1fefdd77a..83a53af123456ae31871e872ed612aa7b88c1ab6 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1251,6 +1251,7 @@ Debugger::Debugger()
: isolate_(NULL),
isolate_id_(ILLEGAL_ISOLATE_ID),
initialized_(false),
+ creation_message_sent_(false),
next_id_(1),
latent_locations_(NULL),
breakpoint_locations_(NULL),
@@ -1299,8 +1300,11 @@ void Debugger::Shutdown() {
bpt->Disable();
delete bpt;
}
- // Signal isolate shutdown event.
- SignalIsolateEvent(DebuggerEvent::kIsolateShutdown);
+ // Signal isolate shutdown event, but only if we previously sent the creation
+ // event.
+ if (creation_message_sent_) {
+ SignalIsolateEvent(DebuggerEvent::kIsolateShutdown);
+ }
}
@@ -2809,8 +2813,10 @@ void Debugger::Initialize(Isolate* isolate) {
void Debugger::NotifyIsolateCreated() {
// Signal isolate creation event.
- if (!ServiceIsolate::IsServiceIsolateDescendant(isolate_)) {
+ if ((isolate_ != Dart::vm_isolate()) &&
+ !ServiceIsolate::IsServiceIsolateDescendant(isolate_)) {
SignalIsolateEvent(DebuggerEvent::kIsolateCreated);
+ creation_message_sent_ = true;
}
}
« no previous file with comments | « runtime/vm/debugger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698