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

Side by Side Diff: runtime/observatory/lib/src/models/objects/event.dart

Issue 2211603002: Centralized event streams (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of models; 5 part of models;
6 6
7 abstract class Event { 7 abstract class Event {
8 /// The timestamp (in milliseconds since the epoch) associated with this
9 /// event. For some isolate pause events, the timestamp is from when the
10 /// isolate was paused. For other events, the timestamp is from when the
11 /// event was created.
8 DateTime get timestamp; 12 DateTime get timestamp;
9 static bool isPauseEvent(Event event) { 13 static bool isPauseEvent(Event event) {
10 return event is PauseStartEvent || event is PauseExitEvent || 14 return event is PauseStartEvent || event is PauseExitEvent ||
11 event is PauseBreakpointEvent || event is PauseInterruptedEvent || 15 event is PauseBreakpointEvent || event is PauseInterruptedEvent ||
12 event is PauseExceptionEvent || event is NoneEvent; 16 event is PauseExceptionEvent || event is NoneEvent;
13 } 17 }
14 } 18 }
19
15 abstract class VMEvent extends Event { 20 abstract class VMEvent extends Event {
21 /// The vm with which this event is associated.
16 VMRef get vm; 22 VMRef get vm;
17 } 23 }
24
18 abstract class VMUpdateEvent extends VMEvent {} 25 abstract class VMUpdateEvent extends VMEvent {}
26
19 abstract class IsolateEvent extends Event { 27 abstract class IsolateEvent extends Event {
28 /// The isolate with which this event is associated.
20 IsolateRef get isolate; 29 IsolateRef get isolate;
21 } 30 }
31
22 abstract class IsolateStartEvent extends IsolateEvent {} 32 abstract class IsolateStartEvent extends IsolateEvent {}
33
23 abstract class IsolateRunnableEvent extends IsolateEvent {} 34 abstract class IsolateRunnableEvent extends IsolateEvent {}
35
24 abstract class IsolateExitEvent extends IsolateEvent {} 36 abstract class IsolateExitEvent extends IsolateEvent {}
37
25 abstract class IsolateUpdateEvent extends IsolateEvent {} 38 abstract class IsolateUpdateEvent extends IsolateEvent {}
39
26 abstract class IsolateReloadEvent extends IsolateEvent { 40 abstract class IsolateReloadEvent extends IsolateEvent {
27 ErrorRef get error; 41 ErrorRef get error;
28 } 42 }
43
29 abstract class ServiceExtensionAddedEvent extends IsolateEvent { 44 abstract class ServiceExtensionAddedEvent extends IsolateEvent {
45 /// The RPC name of the extension that was added.
30 String get extensionRPC; 46 String get extensionRPC;
31 } 47 }
32 abstract class DebugEvent extends IsolateEvent {} 48
49 abstract class DebugEvent extends Event {
50 /// The isolate with which this event is associated.
51 IsolateRef get isolate;
52 }
53
54 abstract class DebuggerSettingsUpdateEvent extends DebugEvent {}
55
33 abstract class PauseStartEvent extends DebugEvent {} 56 abstract class PauseStartEvent extends DebugEvent {}
57
34 abstract class PauseExitEvent extends DebugEvent {} 58 abstract class PauseExitEvent extends DebugEvent {}
59
35 abstract class PauseBreakpointEvent extends DebugEvent { 60 abstract class PauseBreakpointEvent extends DebugEvent {
36 /// [optional] 61 /// [optional] The breakpoint at which we are currently paused.
37 Breakpoint get breakpoint; 62 Breakpoint get breakpoint;
63 /// The list of breakpoints at which we are currently paused
64 /// for a PauseBreakpoint event.
65 ///
66 /// This list may be empty. For example, while single-stepping, the
67 /// VM sends a PauseBreakpoint event with no breakpoints.
68 ///
69 /// If there is more than one breakpoint set at the program position,
70 /// then all of them will be provided.
38 Iterable<Breakpoint> get pauseBreakpoints; 71 Iterable<Breakpoint> get pauseBreakpoints;
72 /// The top stack frame associated with this event.
39 Frame get topFrame; 73 Frame get topFrame;
40 bool get atAsyncSuspension; 74 bool get atAsyncSuspension;
41 } 75 }
76
42 abstract class PauseInterruptedEvent extends DebugEvent { 77 abstract class PauseInterruptedEvent extends DebugEvent {
78 /// [optional] The top stack frame associated with this event. There will be
79 /// no top frame if the isolate is idle (waiting in the message loop).
43 Frame get topFrame; 80 Frame get topFrame;
81 /// Is the isolate paused at an await, yield, or yield* statement?
44 bool get atAsyncSuspension; 82 bool get atAsyncSuspension;
45 } 83 }
84
46 abstract class PauseExceptionEvent extends DebugEvent { 85 abstract class PauseExceptionEvent extends DebugEvent {
86 /// The top stack frame associated with this event.
47 Frame get topFrame; 87 Frame get topFrame;
88 /// The exception associated with this event
48 InstanceRef get exception; 89 InstanceRef get exception;
49 } 90 }
50 abstract class ResumeEvent extends DebugEvent {} 91
92 abstract class ResumeEvent extends DebugEvent {
93 /// [optional] The top stack frame associated with this event. It is provided
94 /// at all times except for the initial resume event that is delivered when an
95 /// isolate begins execution.
96 Frame get topFrame;
97 }
98
51 abstract class BreakpointAddedEvent extends DebugEvent { 99 abstract class BreakpointAddedEvent extends DebugEvent {
100 /// The breakpoint which was added.
52 Breakpoint get breakpoint; 101 Breakpoint get breakpoint;
53 } 102 }
103
54 abstract class BreakpointResolvedEvent extends DebugEvent { 104 abstract class BreakpointResolvedEvent extends DebugEvent {
105 /// The breakpoint which was resolved.
55 Breakpoint get breakpoint; 106 Breakpoint get breakpoint;
56 } 107 }
108
57 abstract class BreakpointRemovedEvent extends DebugEvent { 109 abstract class BreakpointRemovedEvent extends DebugEvent {
110 /// The breakpoint which was removed.
58 Breakpoint get breakpoint; 111 Breakpoint get breakpoint;
59 } 112 }
113
60 abstract class InspectEvent extends DebugEvent { 114 abstract class InspectEvent extends DebugEvent {
115 /// The argument passed to dart:developer.inspect.
61 InstanceRef get inspectee; 116 InstanceRef get inspectee;
62 } 117 }
118
63 abstract class NoneEvent extends DebugEvent {} 119 abstract class NoneEvent extends DebugEvent {}
64 abstract class GCEvent extends IsolateEvent {} 120
121 abstract class GCEvent extends Event {
122 /// The isolate with which this event is associated.
123 IsolateRef get isolate;
124 }
125
65 abstract class ExtensionEvent extends Event { 126 abstract class ExtensionEvent extends Event {
127 /// The isolate with which this event is associated.
66 IsolateRef get isolate; 128 IsolateRef get isolate;
129 /// The extension event kind.
67 String get extensionKind; 130 String get extensionKind;
131 /// The extension event data.
68 ExtensionData get extensionData; 132 ExtensionData get extensionData;
69 } 133 }
70 abstract class TimelineEventsEvent extends IsolateEvent { 134
135 abstract class TimelineEventsEvent extends Event {
136 /// The isolate with which this event is associated.
137 IsolateRef get isolate;
138 /// An array of TimelineEvents
71 Iterable<TimelineEvent> get timelineEvents; 139 Iterable<TimelineEvent> get timelineEvents;
72 } 140 }
141
73 abstract class ConnectionClosedEvent extends Event { 142 abstract class ConnectionClosedEvent extends Event {
143 /// The reason of the closed connection
74 String get reason; 144 String get reason;
75 } 145 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/models/objects/error.dart ('k') | runtime/observatory/lib/src/models/objects/extension_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698