| 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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 return isolate.get(id + "/$command"); | 1474 return isolate.get(id + "/$command"); |
| 1475 } | 1475 } |
| 1476 | 1476 |
| 1477 String toString() => 'Class($vmName)'; | 1477 String toString() => 'Class($vmName)'; |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 class Instance extends ServiceObject { | 1480 class Instance extends ServiceObject { |
| 1481 @observable Class clazz; | 1481 @observable Class clazz; |
| 1482 @observable int size; | 1482 @observable int size; |
| 1483 @observable String valueAsString; // If primitive. | 1483 @observable String valueAsString; // If primitive. |
| 1484 @observable bool valueAsStringIsTruncated; |
| 1484 @observable ServiceFunction closureFunc; // If a closure. | 1485 @observable ServiceFunction closureFunc; // If a closure. |
| 1485 @observable Context closureCtxt; // If a closure. | 1486 @observable Context closureCtxt; // If a closure. |
| 1486 @observable String name; // If a Type. | 1487 @observable String name; // If a Type. |
| 1487 @observable int length; // If a List. | 1488 @observable int length; // If a List. |
| 1488 | 1489 |
| 1489 @observable var typeClass; | 1490 @observable var typeClass; |
| 1490 @observable var fields; | 1491 @observable var fields; |
| 1491 @observable var nativeFields; | 1492 @observable var nativeFields; |
| 1492 @observable var elements; | 1493 @observable var elements; |
| 1493 @observable var userName; | 1494 @observable var userName; |
| 1494 @observable var referent; // If a MirrorReference. | 1495 @observable var referent; // If a MirrorReference. |
| 1495 @observable Instance key; // If a WeakProperty. | 1496 @observable Instance key; // If a WeakProperty. |
| 1496 @observable Instance value; // If a WeakProperty. | 1497 @observable Instance value; // If a WeakProperty. |
| 1497 | 1498 |
| 1498 bool get isClosure => closureFunc != null; | 1499 bool get isClosure => closureFunc != null; |
| 1499 | 1500 |
| 1500 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); | 1501 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); |
| 1501 | 1502 |
| 1502 void _update(ObservableMap map, bool mapIsRef) { | 1503 void _update(ObservableMap map, bool mapIsRef) { |
| 1503 // Extract full properties. | 1504 // Extract full properties. |
| 1504 _upgradeCollection(map, isolate); | 1505 _upgradeCollection(map, isolate); |
| 1505 | 1506 |
| 1506 clazz = map['class']; | 1507 clazz = map['class']; |
| 1507 size = map['size']; | 1508 size = map['size']; |
| 1508 valueAsString = map['valueAsString']; | 1509 valueAsString = map['valueAsString']; |
| 1510 valueAsStringIsTruncated = map['valueAsStringIsTruncated']; |
| 1509 closureFunc = map['closureFunc']; | 1511 closureFunc = map['closureFunc']; |
| 1510 closureCtxt = map['closureCtxt']; | 1512 closureCtxt = map['closureCtxt']; |
| 1511 name = map['name']; | 1513 name = map['name']; |
| 1512 length = map['length']; | 1514 length = map['length']; |
| 1513 | 1515 |
| 1514 if (mapIsRef) { | 1516 if (mapIsRef) { |
| 1515 return; | 1517 return; |
| 1516 } | 1518 } |
| 1517 | 1519 |
| 1518 nativeFields = map['nativeFields']; | 1520 nativeFields = map['nativeFields']; |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 var v = list[i]; | 2532 var v = list[i]; |
| 2531 if ((v is ObservableMap) && _isServiceMap(v)) { | 2533 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 2532 list[i] = owner.getFromMap(v); | 2534 list[i] = owner.getFromMap(v); |
| 2533 } else if (v is ObservableList) { | 2535 } else if (v is ObservableList) { |
| 2534 _upgradeObservableList(v, owner); | 2536 _upgradeObservableList(v, owner); |
| 2535 } else if (v is ObservableMap) { | 2537 } else if (v is ObservableMap) { |
| 2536 _upgradeObservableMap(v, owner); | 2538 _upgradeObservableMap(v, owner); |
| 2537 } | 2539 } |
| 2538 } | 2540 } |
| 2539 } | 2541 } |
| OLD | NEW |