| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 app; | 5 part of app; |
| 6 | 6 |
| 7 class Notification { | 7 class Notification { |
| 8 Notification.fromEvent(this.event); | 8 Notification.fromEvent(this.event); |
| 9 Notification.fromException(this.exception, this.stacktrace); | 9 Notification.fromException(this.exception, this.stacktrace); |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void removePauseEvents(Isolate isolate) { | 80 void removePauseEvents(Isolate isolate) { |
| 81 notifications.removeWhere((notification) { | 81 notifications.removeWhere((notification) { |
| 82 var event = notification.event; | 82 var event = notification.event; |
| 83 return (event != null && | 83 return (event != null && |
| 84 event.isolate == isolate && | 84 event.isolate == isolate && |
| 85 event.isPauseEvent); | 85 event.isPauseEvent); |
| 86 }); | 86 }); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void _onEvent(ServiceEvent event) { | 89 void _onEvent(ServiceEvent event) { |
| 90 assert(event.kind != ServiceEvent.kNone); |
| 91 |
| 90 switch(event.kind) { | 92 switch(event.kind) { |
| 91 case ServiceEvent.kVMUpdate: | 93 case ServiceEvent.kVMUpdate: |
| 92 case ServiceEvent.kIsolateStart: | 94 case ServiceEvent.kIsolateStart: |
| 93 case ServiceEvent.kIsolateRunnable: | 95 case ServiceEvent.kIsolateRunnable: |
| 94 case ServiceEvent.kIsolateUpdate: | 96 case ServiceEvent.kIsolateUpdate: |
| 95 case ServiceEvent.kBreakpointAdded: | 97 case ServiceEvent.kBreakpointAdded: |
| 96 case ServiceEvent.kBreakpointResolved: | 98 case ServiceEvent.kBreakpointResolved: |
| 97 case ServiceEvent.kBreakpointRemoved: | 99 case ServiceEvent.kBreakpointRemoved: |
| 98 case ServiceEvent.kDebuggerSettingsUpdate: | 100 case ServiceEvent.kDebuggerSettingsUpdate: |
| 99 // Ignore for now. | 101 // Ignore for now. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 236 } |
| 235 | 237 |
| 236 // TODO(turnidge): Report this failure via analytics. | 238 // TODO(turnidge): Report this failure via analytics. |
| 237 Logger.root.warning('Caught exception: ${e}\n${st}'); | 239 Logger.root.warning('Caught exception: ${e}\n${st}'); |
| 238 notifications.add(new Notification.fromException(e, st)); | 240 notifications.add(new Notification.fromException(e, st)); |
| 239 } | 241 } |
| 240 | 242 |
| 241 // This map keeps track of which curly-blocks have been expanded by the user. | 243 // This map keeps track of which curly-blocks have been expanded by the user. |
| 242 Map<String,bool> expansions = {}; | 244 Map<String,bool> expansions = {}; |
| 243 } | 245 } |
| OLD | NEW |