Chromium Code Reviews| 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 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 /// The isolate with which this event is associated. | 136 /// The isolate with which this event is associated. |
| 137 IsolateRef get isolate; | 137 IsolateRef get isolate; |
| 138 /// An array of TimelineEvents | 138 /// An array of TimelineEvents |
| 139 Iterable<TimelineEvent> get timelineEvents; | 139 Iterable<TimelineEvent> get timelineEvents; |
| 140 } | 140 } |
| 141 | 141 |
| 142 abstract class ConnectionClosedEvent extends Event { | 142 abstract class ConnectionClosedEvent extends Event { |
| 143 /// The reason of the closed connection | 143 /// The reason of the closed connection |
| 144 String get reason; | 144 String get reason; |
| 145 } | 145 } |
| 146 | |
| 147 Frame topFrame(DebugEvent event) { | |
| 148 if (event is PauseBreakpointEvent) { | |
| 149 return event.topFrame; | |
| 150 } | |
| 151 if (event is PauseInterruptedEvent) { | |
| 152 return event.topFrame; | |
| 153 } | |
| 154 if (event is PauseExceptionEvent) { | |
| 155 return event.topFrame; | |
| 156 } | |
| 157 if (event is ResumeEvent) { | |
| 158 return event.topFrame; | |
| 159 } | |
| 160 return null; | |
| 161 } | |
| 162 | |
| 163 bool isAtAsyncSuspection(DebugEvent event) { | |
|
rmacnak
2016/09/01 17:41:28
isAtAsyncSuspension
cbernaschina
2016/09/01 17:43:59
Done.
| |
| 164 if (event is PauseBreakpointEvent) { | |
| 165 return event.atAsyncSuspension; | |
| 166 } | |
| 167 if (event is PauseInterruptedEvent) { | |
| 168 return event.atAsyncSuspension; | |
| 169 } | |
| 170 return false; | |
| 171 } | |
| OLD | NEW |