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 /// The owner of this [ServiceObject]. This can be an [Isolate], a | 10 /// The owner of this [ServiceObject]. This can be an [Isolate], a |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 493 |
494 String get link => _id; | 494 String get link => _id; |
495 String get hashLink => '#/$_id'; | 495 String get hashLink => '#/$_id'; |
496 | 496 |
497 @observable ServiceMap pauseEvent = null; | 497 @observable ServiceMap pauseEvent = null; |
498 bool get _isPaused => pauseEvent != null; | 498 bool get _isPaused => pauseEvent != null; |
499 | 499 |
500 @observable bool running = false; | 500 @observable bool running = false; |
501 @observable bool idle = false; | 501 @observable bool idle = false; |
502 @observable bool loading = true; | 502 @observable bool loading = true; |
| 503 @observable bool ioEnabled = false; |
503 | 504 |
504 Map<String,ServiceObject> _cache = new Map<String,ServiceObject>(); | 505 Map<String,ServiceObject> _cache = new Map<String,ServiceObject>(); |
505 final TagProfile tagProfile = new TagProfile(20); | 506 final TagProfile tagProfile = new TagProfile(20); |
506 | 507 |
507 Isolate._empty(ServiceObjectOwner owner) : super._empty(owner) { | 508 Isolate._empty(ServiceObjectOwner owner) : super._empty(owner) { |
508 assert(owner is VM); | 509 assert(owner is VM); |
509 } | 510 } |
510 | 511 |
511 /// Creates a link to [id] relative to [this]. | 512 /// Creates a link to [id] relative to [this]. |
512 @reflectable String relativeLink(String id) => '${this.id}/$id'; | 513 @reflectable String relativeLink(String id) => '${this.id}/$id'; |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 timerMap['time_creating_snapshot'] + | 693 timerMap['time_creating_snapshot'] + |
693 timerMap['time_isolate_initialization'] + | 694 timerMap['time_isolate_initialization'] + |
694 timerMap['time_bootstrap']); | 695 timerMap['time_bootstrap']); |
695 timers['dart'] = timerMap['time_dart_execution']; | 696 timers['dart'] = timerMap['time_dart_execution']; |
696 | 697 |
697 newHeapUsed = map['heap']['usedNew']; | 698 newHeapUsed = map['heap']['usedNew']; |
698 oldHeapUsed = map['heap']['usedOld']; | 699 oldHeapUsed = map['heap']['usedOld']; |
699 newHeapCapacity = map['heap']['capacityNew']; | 700 newHeapCapacity = map['heap']['capacityNew']; |
700 oldHeapCapacity = map['heap']['capacityOld']; | 701 oldHeapCapacity = map['heap']['capacityOld']; |
701 | 702 |
| 703 List features = map['features']; |
| 704 if (features != null) { |
| 705 for (var feature in features) { |
| 706 if (feature == 'io') { |
| 707 ioEnabled = true; |
| 708 } |
| 709 } |
| 710 } |
702 // Isolate status | 711 // Isolate status |
703 pauseEvent = map['pauseEvent']; | 712 pauseEvent = map['pauseEvent']; |
704 running = (!_isPaused && map['topFrame'] != null); | 713 running = (!_isPaused && map['topFrame'] != null); |
705 idle = (!_isPaused && map['topFrame'] == null); | 714 idle = (!_isPaused && map['topFrame'] == null); |
706 error = map['error']; | 715 error = map['error']; |
707 | 716 |
708 libraries.clear(); | 717 libraries.clear(); |
709 for (var lib in map['libraries']) { | 718 for (var lib in map['libraries']) { |
710 libraries.add(lib); | 719 libraries.add(lib); |
711 } | 720 } |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 var v = list[i]; | 1516 var v = list[i]; |
1508 if ((v is ObservableMap) && _isServiceMap(v)) { | 1517 if ((v is ObservableMap) && _isServiceMap(v)) { |
1509 list[i] = owner.getFromMap(v); | 1518 list[i] = owner.getFromMap(v); |
1510 } else if (v is ObservableList) { | 1519 } else if (v is ObservableList) { |
1511 _upgradeObservableList(v, owner); | 1520 _upgradeObservableList(v, owner); |
1512 } else if (v is ObservableMap) { | 1521 } else if (v is ObservableMap) { |
1513 _upgradeObservableMap(v, owner); | 1522 _upgradeObservableMap(v, owner); |
1514 } | 1523 } |
1515 } | 1524 } |
1516 } | 1525 } |
OLD | NEW |