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 import 'package:logging/logging.dart'; | 5 import 'package:logging/logging.dart'; |
6 import 'package:observatory/models.dart' as M; | 6 import 'package:observatory/models.dart' as M; |
7 import 'package:observatory/service.dart' as S; | 7 import 'package:observatory/service.dart' as S; |
8 | 8 |
9 class VMUpdateEvent implements M.VMUpdateEvent { | 9 class VMUpdateEvent implements M.VMUpdateEvent { |
10 final DateTime timestamp; | 10 final DateTime timestamp; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 final M.Frame topFrame; | 131 final M.Frame topFrame; |
132 final bool atAsyncSuspension; | 132 final bool atAsyncSuspension; |
133 PauseInterruptedEvent( | 133 PauseInterruptedEvent( |
134 this.timestamp, this.isolate, this.topFrame, this.atAsyncSuspension) { | 134 this.timestamp, this.isolate, this.topFrame, this.atAsyncSuspension) { |
135 assert(timestamp != null); | 135 assert(timestamp != null); |
136 assert(isolate != null); | 136 assert(isolate != null); |
137 assert(atAsyncSuspension != null); | 137 assert(atAsyncSuspension != null); |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
| 141 |
141 class PausePostRequestEvent implements M.PausePostRequestEvent { | 142 class PausePostRequestEvent implements M.PausePostRequestEvent { |
142 final DateTime timestamp; | 143 final DateTime timestamp; |
143 final M.IsolateRef isolate; | 144 final M.IsolateRef isolate; |
144 final M.Frame topFrame; | 145 final M.Frame topFrame; |
145 final bool atAsyncSuspension; | 146 final bool atAsyncSuspension; |
146 PausePostRequestEvent( | 147 PausePostRequestEvent( |
147 this.timestamp, this.isolate, this.topFrame, this.atAsyncSuspension) { | 148 this.timestamp, this.isolate, this.topFrame, this.atAsyncSuspension) { |
148 assert(timestamp != null); | 149 assert(timestamp != null); |
149 assert(isolate != null); | 150 assert(isolate != null); |
150 assert(atAsyncSuspension != null); | 151 assert(atAsyncSuspension != null); |
151 } | 152 } |
152 } | 153 } |
153 | 154 |
| 155 |
154 class PauseExceptionEvent implements M.PauseExceptionEvent { | 156 class PauseExceptionEvent implements M.PauseExceptionEvent { |
155 final DateTime timestamp; | 157 final DateTime timestamp; |
156 final M.IsolateRef isolate; | 158 final M.IsolateRef isolate; |
157 final M.Frame topFrame; | 159 final M.Frame topFrame; |
158 final M.InstanceRef exception; | 160 final M.InstanceRef exception; |
159 PauseExceptionEvent( | 161 PauseExceptionEvent( |
160 this.timestamp, this.isolate, this.topFrame, this.exception) { | 162 this.timestamp, this.isolate, this.topFrame, this.exception) { |
161 assert(timestamp != null); | 163 assert(timestamp != null); |
162 assert(isolate != null); | 164 assert(isolate != null); |
163 assert(topFrame != null); | 165 assert(topFrame != null); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 event.timestamp, event.isolate, event.breakpoint); | 312 event.timestamp, event.isolate, event.breakpoint); |
311 case S.ServiceEvent.kDebuggerSettingsUpdate: | 313 case S.ServiceEvent.kDebuggerSettingsUpdate: |
312 return new DebuggerSettingsUpdateEvent(event.timestamp, event.isolate); | 314 return new DebuggerSettingsUpdateEvent(event.timestamp, event.isolate); |
313 case S.ServiceEvent.kResume: | 315 case S.ServiceEvent.kResume: |
314 return new ResumeEvent(event.timestamp, event.isolate, event.topFrame); | 316 return new ResumeEvent(event.timestamp, event.isolate, event.topFrame); |
315 case S.ServiceEvent.kPauseStart: | 317 case S.ServiceEvent.kPauseStart: |
316 return new PauseStartEvent(event.timestamp, event.isolate); | 318 return new PauseStartEvent(event.timestamp, event.isolate); |
317 case S.ServiceEvent.kPauseExit: | 319 case S.ServiceEvent.kPauseExit: |
318 return new PauseExitEvent(event.timestamp, event.isolate); | 320 return new PauseExitEvent(event.timestamp, event.isolate); |
319 case S.ServiceEvent.kPausePostRequest: | 321 case S.ServiceEvent.kPausePostRequest: |
320 return new PausePostRequestEvent(event.timestamp, event.isolate, | 322 return new PausePostRequestEvent( |
321 event.topFrame, event.atAsyncSuspension); | 323 event.timestamp, |
| 324 event.isolate, |
| 325 event.topFrame, |
| 326 event.atAsyncSuspension); |
322 case S.ServiceEvent.kPauseBreakpoint: | 327 case S.ServiceEvent.kPauseBreakpoint: |
323 return new PauseBreakpointEvent( | 328 return new PauseBreakpointEvent( |
324 event.timestamp, | 329 event.timestamp, |
325 event.isolate, | 330 event.isolate, |
326 event.pauseBreakpoints, | 331 event.pauseBreakpoints, |
327 event.topFrame, | 332 event.topFrame, |
328 event.atAsyncSuspension, | 333 event.atAsyncSuspension, |
329 event.breakpoint); | 334 event.breakpoint); |
330 case S.Isolate.kLoggingStream: | 335 case S.Isolate.kLoggingStream: |
331 return new LoggingEvent(event.timestamp, event.isolate, event.logRecord); | 336 return new LoggingEvent(event.timestamp, event.isolate, event.logRecord); |
332 case S.ServiceEvent.kPauseInterrupted: | 337 case S.ServiceEvent.kPauseInterrupted: |
333 return new PauseInterruptedEvent(event.timestamp, event.isolate, | 338 return new PauseInterruptedEvent(event.timestamp, event.isolate, |
334 event.topFrame, event.atAsyncSuspension); | 339 event.topFrame, event.atAsyncSuspension); |
335 case S.ServiceEvent.kPauseException: | 340 case S.ServiceEvent.kPauseException: |
336 return new PauseExceptionEvent( | 341 return new PauseExceptionEvent( |
337 event.timestamp, event.isolate, event.topFrame, event.exception); | 342 event.timestamp, event.isolate, event.topFrame, event.exception); |
338 case S.ServiceEvent.kInspect: | 343 case S.ServiceEvent.kInspect: |
339 return new InspectEvent(event.timestamp, event.isolate, event.inspectee); | 344 return new InspectEvent(event.timestamp, event.isolate, event.inspectee); |
340 case S.ServiceEvent.kGC: | 345 case S.ServiceEvent.kGC: |
341 return new GCEvent(event.timestamp, event.isolate); | 346 return new GCEvent(event.timestamp, event.isolate); |
342 case S.ServiceEvent.kNone: | 347 case S.ServiceEvent.kNone: |
343 return new NoneEvent(event.timestamp, event.isolate); | 348 return new NoneEvent(event.timestamp, event.isolate); |
344 default: | 349 default: |
345 // Ignore unrecognized events. | 350 // Ignore unrecognized events. |
346 Logger.root.severe('Unrecognized event: $event'); | 351 Logger.root.severe('Unrecognized event: $event'); |
347 return null; | 352 return null; |
348 } | 353 } |
349 } | 354 } |
OLD | NEW |