OLD | NEW |
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 || | 14 return event is PauseStartEvent || |
15 event is PauseExitEvent || | 15 event is PauseExitEvent || |
16 event is PauseBreakpointEvent || | 16 event is PauseBreakpointEvent || |
17 event is PauseInterruptedEvent || | 17 event is PauseInterruptedEvent || |
18 event is PauseExceptionEvent || | 18 event is PauseExceptionEvent || |
| 19 event is PausePostRequestEvent || |
19 event is NoneEvent; | 20 event is NoneEvent; |
20 } | 21 } |
21 } | 22 } |
22 | 23 |
23 abstract class VMEvent extends Event { | 24 abstract class VMEvent extends Event { |
24 /// The vm with which this event is associated. | 25 /// The vm with which this event is associated. |
25 VMRef get vm; | 26 VMRef get vm; |
26 } | 27 } |
27 | 28 |
28 abstract class VMUpdateEvent extends VMEvent {} | 29 abstract class VMUpdateEvent extends VMEvent {} |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 82 |
82 abstract class PauseInterruptedEvent extends DebugEvent { | 83 abstract class PauseInterruptedEvent extends DebugEvent { |
83 /// [optional] The top stack frame associated with this event. There will be | 84 /// [optional] The top stack frame associated with this event. There will be |
84 /// no top frame if the isolate is idle (waiting in the message loop). | 85 /// no top frame if the isolate is idle (waiting in the message loop). |
85 Frame get topFrame; | 86 Frame get topFrame; |
86 | 87 |
87 /// Is the isolate paused at an await, yield, or yield* statement? | 88 /// Is the isolate paused at an await, yield, or yield* statement? |
88 bool get atAsyncSuspension; | 89 bool get atAsyncSuspension; |
89 } | 90 } |
90 | 91 |
| 92 abstract class PausePostRequestEvent extends DebugEvent { |
| 93 /// [optional] The top stack frame associated with this event. There will be |
| 94 /// no top frame if the isolate is idle (waiting in the message loop). |
| 95 Frame get topFrame; |
| 96 |
| 97 /// Is the isolate paused at an await, yield, or yield* statement? |
| 98 bool get atAsyncSuspension; |
| 99 } |
| 100 |
91 abstract class PauseExceptionEvent extends DebugEvent { | 101 abstract class PauseExceptionEvent extends DebugEvent { |
92 /// The top stack frame associated with this event. | 102 /// The top stack frame associated with this event. |
93 Frame get topFrame; | 103 Frame get topFrame; |
94 | 104 |
95 /// The exception associated with this event | 105 /// The exception associated with this event |
96 InstanceRef get exception; | 106 InstanceRef get exception; |
97 } | 107 } |
98 | 108 |
99 abstract class ResumeEvent extends DebugEvent { | 109 abstract class ResumeEvent extends DebugEvent { |
100 /// [optional] The top stack frame associated with this event. It is provided | 110 /// [optional] The top stack frame associated with this event. It is provided |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 190 |
181 bool isAtAsyncSuspension(DebugEvent event) { | 191 bool isAtAsyncSuspension(DebugEvent event) { |
182 if (event is PauseBreakpointEvent) { | 192 if (event is PauseBreakpointEvent) { |
183 return event.atAsyncSuspension; | 193 return event.atAsyncSuspension; |
184 } | 194 } |
185 if (event is PauseInterruptedEvent) { | 195 if (event is PauseInterruptedEvent) { |
186 return event.atAsyncSuspension; | 196 return event.atAsyncSuspension; |
187 } | 197 } |
188 return false; | 198 return false; |
189 } | 199 } |
OLD | NEW |