Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: runtime/bin/vmservice/client/lib/src/service/object.dart

Issue 199363002: Rework library and class view pages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: edits Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /// State for a running isolate. 7 /// State for a running isolate.
8 class Isolate extends ServiceObject { 8 class Isolate extends ServiceObject {
9 final VM vm; 9 final VM vm;
10 String get link => _id; 10 String get link => _id;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 var codeTable = new List<Code>(); 51 var codeTable = new List<Code>();
52 var profileCodes = profile['codes']; 52 var profileCodes = profile['codes'];
53 for (var profileCode in profileCodes) { 53 for (var profileCode in profileCodes) {
54 Code code = profileCode['code']; 54 Code code = profileCode['code'];
55 codeTable.add(code); 55 codeTable.add(code);
56 } 56 }
57 _codes._resetProfileData(); 57 _codes._resetProfileData();
58 _codes._updateProfileData(profile, codeTable); 58 _codes._updateProfileData(profile, codeTable);
59 } 59 }
60 60
61 Future<ServiceObject> getDirect(String serviceId) {
62 return vm.getAsMap(relativeLink(serviceId)).then((ObservableMap m) {
63 return _upgradeToServiceObject(vm, this, m);
64 });
65 }
66
61 /// Requests [serviceId] from [this]. Completes to a [ServiceObject]. 67 /// Requests [serviceId] from [this]. Completes to a [ServiceObject].
62 /// Can return pre-existing, cached, [ServiceObject]s. 68 /// Can return pre-existing, cached, [ServiceObject]s.
63 Future<ServiceObject> get(String serviceId) { 69 Future<ServiceObject> get(String serviceId) {
64 if (_scripts.cachesId(serviceId)) { 70 if (_scripts.cachesId(serviceId)) {
65 return _scripts.get(serviceId); 71 return _scripts.get(serviceId);
66 } 72 }
67 if (_codes.cachesId(serviceId)) { 73 if (_codes.cachesId(serviceId)) {
68 return _codes.get(serviceId); 74 return _codes.get(serviceId);
69 } 75 }
70 if (_classes.cachesId(serviceId)) { 76 if (_classes.cachesId(serviceId)) {
71 return _classes.get(serviceId); 77 return _classes.get(serviceId);
72 } 78 }
73 return vm.getAsMap(relativeLink(serviceId)).then((ObservableMap m) { 79 return getDirect(serviceId);
74 return _upgradeToServiceObject(vm, this, m);
75 });
76 } 80 }
77 81
78 @observable ServiceMap rootLib; 82 @observable ServiceMap rootLib;
79 @observable ObservableMap topFrame; 83 @observable ObservableMap topFrame;
80 84
81 @observable String name; 85 @observable String name;
82 @observable String vmName; 86 @observable String vmName;
83 @observable Map entry; 87 @observable Map entry;
84 88
85 @observable final Map<String, double> timers = 89 @observable final Map<String, double> timers =
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 583
580 int _callCount(List<CodeCallCount> calls, Code code) { 584 int _callCount(List<CodeCallCount> calls, Code code) {
581 for (CodeCallCount caller in calls) { 585 for (CodeCallCount caller in calls) {
582 if (caller.code == code) { 586 if (caller.code == code) {
583 return caller.count; 587 return caller.count;
584 } 588 }
585 } 589 }
586 return 0; 590 return 0;
587 } 591 }
588 } 592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698