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 print(features); | |
Cutch
2014/05/23 05:51:37
remove before commit
Anders Johnsen
2014/05/23 05:59:13
Done.
| |
705 if (features != null) { | |
706 for (var feature in features) { | |
707 if (feature == 'io') { | |
708 ioEnabled = true; | |
709 } | |
710 } | |
711 } | |
702 // Isolate status | 712 // Isolate status |
703 pauseEvent = map['pauseEvent']; | 713 pauseEvent = map['pauseEvent']; |
704 running = (!_isPaused && map['topFrame'] != null); | 714 running = (!_isPaused && map['topFrame'] != null); |
705 idle = (!_isPaused && map['topFrame'] == null); | 715 idle = (!_isPaused && map['topFrame'] == null); |
706 error = map['error']; | 716 error = map['error']; |
707 | 717 |
708 libraries.clear(); | 718 libraries.clear(); |
709 for (var lib in map['libraries']) { | 719 for (var lib in map['libraries']) { |
710 libraries.add(lib); | 720 libraries.add(lib); |
711 } | 721 } |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1507 var v = list[i]; | 1517 var v = list[i]; |
1508 if ((v is ObservableMap) && _isServiceMap(v)) { | 1518 if ((v is ObservableMap) && _isServiceMap(v)) { |
1509 list[i] = owner.getFromMap(v); | 1519 list[i] = owner.getFromMap(v); |
1510 } else if (v is ObservableList) { | 1520 } else if (v is ObservableList) { |
1511 _upgradeObservableList(v, owner); | 1521 _upgradeObservableList(v, owner); |
1512 } else if (v is ObservableMap) { | 1522 } else if (v is ObservableMap) { |
1513 _upgradeObservableMap(v, owner); | 1523 _upgradeObservableMap(v, owner); |
1514 } | 1524 } |
1515 } | 1525 } |
1516 } | 1526 } |
OLD | NEW |