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

Unified Diff: runtime/vm/isolate.cc

Issue 1756393002: Fix some service protocol isolate lifecycle races (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/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 70cca1ab368e7c03d20569c3f4be49ce83ecb902..7d1b118b42fc38a58783c14567c9ce5766400abb 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1950,7 +1950,13 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit());
if (debugger() != NULL) {
- if (message_handler()->is_paused_on_start()) {
+ if (!is_runnable()) {
+ // Isolate is not yet runnable.
+ ASSERT(debugger()->PauseEvent() == NULL);
+ ServiceEvent pause_event(this, ServiceEvent::kNone);
+ jsobj.AddProperty("pauseEvent", &pause_event);
+ } else if (message_handler()->is_paused_on_start() ||
+ message_handler()->should_pause_on_start()) {
ASSERT(debugger()->PauseEvent() == NULL);
ServiceEvent pause_event(this, ServiceEvent::kPauseStart);
jsobj.AddProperty("pauseEvent", &pause_event);
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698