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

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

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 years, 3 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 8 /// The timestamp (in milliseconds since the epoch) associated with this
9 /// event. For some isolate pause events, the timestamp is from when the 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 10 /// isolate was paused. For other events, the timestamp is from when the
11 /// event was created. 11 /// event was created.
12 DateTime get timestamp; 12 DateTime get timestamp;
13 static bool isPauseEvent(Event event) { 13 static bool isPauseEvent(Event event) {
14 return event is PauseStartEvent || event is PauseExitEvent || 14 return event is PauseStartEvent ||
15 event is PauseBreakpointEvent || event is PauseInterruptedEvent || 15 event is PauseExitEvent ||
16 event is PauseExceptionEvent || event is NoneEvent; 16 event is PauseBreakpointEvent ||
17 event is PauseInterruptedEvent ||
18 event is PauseExceptionEvent ||
19 event is NoneEvent;
17 } 20 }
18 } 21 }
19 22
20 abstract class VMEvent extends Event { 23 abstract class VMEvent extends Event {
21 /// The vm with which this event is associated. 24 /// The vm with which this event is associated.
22 VMRef get vm; 25 VMRef get vm;
23 } 26 }
24 27
25 abstract class VMUpdateEvent extends VMEvent {} 28 abstract class VMUpdateEvent extends VMEvent {}
26 29
(...skipping 26 matching lines...) Expand all
53 56
54 abstract class DebuggerSettingsUpdateEvent extends DebugEvent {} 57 abstract class DebuggerSettingsUpdateEvent extends DebugEvent {}
55 58
56 abstract class PauseStartEvent extends DebugEvent {} 59 abstract class PauseStartEvent extends DebugEvent {}
57 60
58 abstract class PauseExitEvent extends DebugEvent {} 61 abstract class PauseExitEvent extends DebugEvent {}
59 62
60 abstract class PauseBreakpointEvent extends DebugEvent { 63 abstract class PauseBreakpointEvent extends DebugEvent {
61 /// [optional] The breakpoint at which we are currently paused. 64 /// [optional] The breakpoint at which we are currently paused.
62 Breakpoint get breakpoint; 65 Breakpoint get breakpoint;
66
63 /// The list of breakpoints at which we are currently paused 67 /// The list of breakpoints at which we are currently paused
64 /// for a PauseBreakpoint event. 68 /// for a PauseBreakpoint event.
65 /// 69 ///
66 /// This list may be empty. For example, while single-stepping, the 70 /// This list may be empty. For example, while single-stepping, the
67 /// VM sends a PauseBreakpoint event with no breakpoints. 71 /// VM sends a PauseBreakpoint event with no breakpoints.
68 /// 72 ///
69 /// If there is more than one breakpoint set at the program position, 73 /// If there is more than one breakpoint set at the program position,
70 /// then all of them will be provided. 74 /// then all of them will be provided.
71 Iterable<Breakpoint> get pauseBreakpoints; 75 Iterable<Breakpoint> get pauseBreakpoints;
76
72 /// The top stack frame associated with this event. 77 /// The top stack frame associated with this event.
73 Frame get topFrame; 78 Frame get topFrame;
74 bool get atAsyncSuspension; 79 bool get atAsyncSuspension;
75 } 80 }
76 81
77 abstract class PauseInterruptedEvent extends DebugEvent { 82 abstract class PauseInterruptedEvent extends DebugEvent {
78 /// [optional] The top stack frame associated with this event. There will be 83 /// [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). 84 /// no top frame if the isolate is idle (waiting in the message loop).
80 Frame get topFrame; 85 Frame get topFrame;
86
81 /// Is the isolate paused at an await, yield, or yield* statement? 87 /// Is the isolate paused at an await, yield, or yield* statement?
82 bool get atAsyncSuspension; 88 bool get atAsyncSuspension;
83 } 89 }
84 90
85 abstract class PauseExceptionEvent extends DebugEvent { 91 abstract class PauseExceptionEvent extends DebugEvent {
86 /// The top stack frame associated with this event. 92 /// The top stack frame associated with this event.
87 Frame get topFrame; 93 Frame get topFrame;
94
88 /// The exception associated with this event 95 /// The exception associated with this event
89 InstanceRef get exception; 96 InstanceRef get exception;
90 } 97 }
91 98
92 abstract class ResumeEvent extends DebugEvent { 99 abstract class ResumeEvent extends DebugEvent {
93 /// [optional] The top stack frame associated with this event. It is provided 100 /// [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 101 /// at all times except for the initial resume event that is delivered when an
95 /// isolate begins execution. 102 /// isolate begins execution.
96 Frame get topFrame; 103 Frame get topFrame;
97 } 104 }
(...skipping 21 matching lines...) Expand all
119 abstract class NoneEvent extends DebugEvent {} 126 abstract class NoneEvent extends DebugEvent {}
120 127
121 abstract class GCEvent extends Event { 128 abstract class GCEvent extends Event {
122 /// The isolate with which this event is associated. 129 /// The isolate with which this event is associated.
123 IsolateRef get isolate; 130 IsolateRef get isolate;
124 } 131 }
125 132
126 abstract class ExtensionEvent extends Event { 133 abstract class ExtensionEvent extends Event {
127 /// The isolate with which this event is associated. 134 /// The isolate with which this event is associated.
128 IsolateRef get isolate; 135 IsolateRef get isolate;
136
129 /// The extension event kind. 137 /// The extension event kind.
130 String get extensionKind; 138 String get extensionKind;
139
131 /// The extension event data. 140 /// The extension event data.
132 ExtensionData get extensionData; 141 ExtensionData get extensionData;
133 } 142 }
134 143
135 abstract class LoggingEvent extends Event { 144 abstract class LoggingEvent extends Event {
136 /// The isolate with which this event is associated. 145 /// The isolate with which this event is associated.
137 IsolateRef get isolate; 146 IsolateRef get isolate;
138 147
139 // TODO(cbernaschina) objectify 148 // TODO(cbernaschina) objectify
140 Map get logRecord; 149 Map get logRecord;
141 } 150 }
142 151
143 abstract class TimelineEventsEvent extends Event { 152 abstract class TimelineEventsEvent extends Event {
144 /// The isolate with which this event is associated. 153 /// The isolate with which this event is associated.
145 IsolateRef get isolate; 154 IsolateRef get isolate;
155
146 /// An array of TimelineEvents 156 /// An array of TimelineEvents
147 Iterable<TimelineEvent> get timelineEvents; 157 Iterable<TimelineEvent> get timelineEvents;
148 } 158 }
149 159
150 abstract class ConnectionClosedEvent extends Event { 160 abstract class ConnectionClosedEvent extends Event {
151 /// The reason of the closed connection 161 /// The reason of the closed connection
152 String get reason; 162 String get reason;
153 } 163 }
154 164
155 Frame topFrame(DebugEvent event) { 165 Frame topFrame(DebugEvent event) {
(...skipping 14 matching lines...) Expand all
170 180
171 bool isAtAsyncSuspension(DebugEvent event) { 181 bool isAtAsyncSuspension(DebugEvent event) {
172 if (event is PauseBreakpointEvent) { 182 if (event is PauseBreakpointEvent) {
173 return event.atAsyncSuspension; 183 return event.atAsyncSuspension;
174 } 184 }
175 if (event is PauseInterruptedEvent) { 185 if (event is PauseInterruptedEvent) {
176 return event.atAsyncSuspension; 186 return event.atAsyncSuspension;
177 } 187 }
178 return false; 188 return false;
179 } 189 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/models/objects/error.dart ('k') | runtime/observatory/lib/src/models/objects/field.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698