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

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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 70cca1ab368e7c03d20569c3f4be49ce83ecb902..5ba48e18a841efbcdd6d45c9858088c0777fb66b 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::kPauseUntilRunnable);
+ 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);

Powered by Google App Engine
This is Rietveld 408576698