@@ -55,20 +55,25 @@ ServiceEvent::ServiceEvent(IsolateGroup* isolate_group,
5555 // over the service.
5656 ASSERT (isolate_ != Dart::vm_isolate ());
5757
58- // VM internal isolates should never post service events. However, the Isolate
59- // service object uses a service event to represent the current running state
60- // of the isolate, so we need to allow for system isolates to create resume
61- // and none events for this purpose. The resume event represents a running
62- // isolate and the none event is returned for an isolate that has not yet
63- // been marked as runnable (see "pauseEvent" in Isolate::PrintJSON).
58+ // VM-internal isolates should never post service events outside of the
59+ // following cases:
60+ // - The `Isolate` service object uses a service event to represent the
61+ // current running state of the isolate, so we need to allow for system
62+ // isolates to create `kResume` and `kNone` events for this purpose. The
63+ // `kResume` event represents a running isolate and the `kNone` event is
64+ // returned for an isolate that has not yet been marked as runnable (see
65+ // "pauseEvent" in Isolate::PrintJSON).
66+ // - `kEmbedder` events relaying output printed on stdout/stderr may be
67+ // posted from any isolate.
68+ // - `kCpuSamples` events may be posted from any isolate.
69+ // - `kTimerSignificantlyOverdue` events may be posted from any isolate.
6470 ASSERT (isolate == nullptr || !Isolate::IsVMInternalIsolate (isolate) ||
6571 (Isolate::IsVMInternalIsolate (isolate) &&
6672 (event_kind == ServiceEvent::kResume ||
6773 event_kind == ServiceEvent::kNone ||
68- // VM service can print Observatory information to Stdout or Stderr
69- // which are embedder streams.
7074 event_kind == ServiceEvent::kEmbedder ||
71- event_kind == ServiceEvent::kCpuSamples )));
75+ event_kind == ServiceEvent::kCpuSamples ||
76+ event_kind == ServiceEvent::kTimerSignificantlyOverdue )));
7277
7378 if ((event_kind == ServiceEvent::kPauseStart ) ||
7479 (event_kind == ServiceEvent::kPauseExit )) {
0 commit comments