| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 return new Future.value(this); | 223 return new Future.value(this); |
| 224 } | 224 } |
| 225 if (_inProgressReload == null) { | 225 if (_inProgressReload == null) { |
| 226 _inProgressReload = vm.getAsMap(link).then((ObservableMap map) { | 226 _inProgressReload = vm.getAsMap(link).then((ObservableMap map) { |
| 227 var mapType = _stripRef(map['type']); | 227 var mapType = _stripRef(map['type']); |
| 228 if (mapType != _type) { | 228 if (mapType != _type) { |
| 229 // If the type changes, return a new object instead of | 229 // If the type changes, return a new object instead of |
| 230 // updating the existing one. | 230 // updating the existing one. |
| 231 // | 231 // |
| 232 // TODO(turnidge): Check for vmType changing as well? | 232 // TODO(turnidge): Check for vmType changing as well? |
| 233 assert(mapType == 'Error' || mapType == 'null'); | 233 assert(mapType == 'Error' || mapType == 'Sentinel'); |
| 234 return new ServiceObject._fromMap(owner, map); | 234 return new ServiceObject._fromMap(owner, map); |
| 235 } | 235 } |
| 236 update(map); | 236 update(map); |
| 237 return this; | 237 return this; |
| 238 }).whenComplete(() { | 238 }).whenComplete(() { |
| 239 // This reload is complete. | 239 // This reload is complete. |
| 240 _inProgressReload = null; | 240 _inProgressReload = null; |
| 241 }); | 241 }); |
| 242 } | 242 } |
| 243 return _inProgressReload; | 243 return _inProgressReload; |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2725 var v = list[i]; | 2725 var v = list[i]; |
| 2726 if ((v is ObservableMap) && _isServiceMap(v)) { | 2726 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 2727 list[i] = owner.getFromMap(v); | 2727 list[i] = owner.getFromMap(v); |
| 2728 } else if (v is ObservableList) { | 2728 } else if (v is ObservableList) { |
| 2729 _upgradeObservableList(v, owner); | 2729 _upgradeObservableList(v, owner); |
| 2730 } else if (v is ObservableMap) { | 2730 } else if (v is ObservableMap) { |
| 2731 _upgradeObservableMap(v, owner); | 2731 _upgradeObservableMap(v, owner); |
| 2732 } | 2732 } |
| 2733 } | 2733 } |
| 2734 } | 2734 } |
| OLD | NEW |