Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index 197c77fe8f99e286d96e6a5c3e90e83c0dc60ed7..2dfc8e94f5fced703145883834b14820e411d8ce 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -1008,16 +1008,17 @@ static void ReportPauseOnConsole(ServiceEvent* event) { |
void Service::HandleEvent(ServiceEvent* event) { |
- if (event->isolate() != NULL && |
- ServiceIsolate::IsServiceIsolateDescendant(event->isolate())) { |
+ if (event->stream_info() != NULL && |
+ !event->stream_info()->enabled()) { |
+ if (FLAG_warn_on_pause_with_no_debugger && |
+ event->IsPause()) { |
+ // If we are about to pause a running program which has no |
+ // debugger connected, tell the user about it. |
+ ReportPauseOnConsole(event); |
+ } |
+ // Ignore events when no one is listening to the event stream. |
return; |
} |
- if (FLAG_warn_on_pause_with_no_debugger && |
- event->IsPause() && !Service::debug_stream.enabled()) { |
- // If we are about to pause a running program which has no |
- // debugger connected, tell the user about it. |
- ReportPauseOnConsole(event); |
- } |
if (!ServiceIsolate::IsRunning()) { |
return; |
} |