OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 service; | 5 part of service; |
6 | 6 |
7 /// A [ServiceObject] is an object known to the VM service and is tied | 7 /// A [ServiceObject] is an object known to the VM service and is tied |
8 /// to an owning [Isolate]. | 8 /// to an owning [Isolate]. |
9 abstract class ServiceObject extends Observable { | 9 abstract class ServiceObject extends Observable { |
10 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { | 10 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 @observable String message; | 1271 @observable String message; |
1272 @observable dynamic response; | 1272 @observable dynamic response; |
1273 | 1273 |
1274 void _update(ObservableMap map, bool mapIsRef) { | 1274 void _update(ObservableMap map, bool mapIsRef) { |
1275 kind = map['kind']; | 1275 kind = map['kind']; |
1276 message = map['message']; | 1276 message = map['message']; |
1277 response = map['response']; | 1277 response = map['response']; |
1278 name = 'ServiceException $kind'; | 1278 name = 'ServiceException $kind'; |
1279 vmName = name; | 1279 vmName = name; |
1280 } | 1280 } |
| 1281 |
| 1282 String toString() => 'ServiceException($message)'; |
1281 } | 1283 } |
1282 | 1284 |
1283 /// A [ServiceEvent] is an asynchronous event notification from the vm. | 1285 /// A [ServiceEvent] is an asynchronous event notification from the vm. |
1284 class ServiceEvent extends ServiceObject { | 1286 class ServiceEvent extends ServiceObject { |
1285 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); | 1287 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); |
1286 | 1288 |
1287 @observable String eventType; | 1289 @observable String eventType; |
1288 @observable ServiceMap breakpoint; | 1290 @observable ServiceMap breakpoint; |
1289 @observable ServiceMap exception; | 1291 @observable ServiceMap exception; |
1290 @observable ByteData data; | 1292 @observable ByteData data; |
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2561 var v = list[i]; | 2563 var v = list[i]; |
2562 if ((v is ObservableMap) && _isServiceMap(v)) { | 2564 if ((v is ObservableMap) && _isServiceMap(v)) { |
2563 list[i] = owner.getFromMap(v); | 2565 list[i] = owner.getFromMap(v); |
2564 } else if (v is ObservableList) { | 2566 } else if (v is ObservableList) { |
2565 _upgradeObservableList(v, owner); | 2567 _upgradeObservableList(v, owner); |
2566 } else if (v is ObservableMap) { | 2568 } else if (v is ObservableMap) { |
2567 _upgradeObservableMap(v, owner); | 2569 _upgradeObservableMap(v, owner); |
2568 } | 2570 } |
2569 } | 2571 } |
2570 } | 2572 } |
OLD | NEW |