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

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

Issue 241253002: VM Service: Include a response id when enumerating scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 obj = new ServiceObject._fromMap(this, map); 555 obj = new ServiceObject._fromMap(this, map);
556 if (obj.canCache) { 556 if (obj.canCache) {
557 _cache[id] = obj; 557 _cache[id] = obj;
558 } 558 }
559 return obj; 559 return obj;
560 } 560 }
561 561
562 Future<ServiceObject> get(String id) { 562 Future<ServiceObject> get(String id) {
563 // Do not allow null ids or empty ids. 563 // Do not allow null ids or empty ids.
564 assert(id != null && id != ''); 564 assert(id != null && id != '');
565 if( id.contains('scripts')) throw "Here we are";
566
Cutch 2014/04/17 18:11:40 remove this
565 var obj = _cache[id]; 567 var obj = _cache[id];
566 if (obj != null) { 568 if (obj != null) {
567 return obj.reload(); 569 return obj.reload();
568 } 570 }
569 // Cache miss. Get the object from the vm directly. 571 // Cache miss. Get the object from the vm directly.
570 return vm.getAsMap(relativeLink(id)).then((ObservableMap map) { 572 return vm.getAsMap(relativeLink(id)).then((ObservableMap map) {
571 var obj = new ServiceObject._fromMap(this, map); 573 var obj = new ServiceObject._fromMap(this, map);
572 if (obj.canCache) { 574 if (obj.canCache) {
573 _cache.putIfAbsent(id, () => obj); 575 _cache.putIfAbsent(id, () => obj);
574 } 576 }
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 var v = list[i]; 1256 var v = list[i];
1255 if ((v is ObservableMap) && _isServiceMap(v)) { 1257 if ((v is ObservableMap) && _isServiceMap(v)) {
1256 list[i] = owner.getFromMap(v); 1258 list[i] = owner.getFromMap(v);
1257 } else if (v is ObservableList) { 1259 } else if (v is ObservableList) {
1258 _upgradeObservableList(v, owner); 1260 _upgradeObservableList(v, owner);
1259 } else if (v is ObservableMap) { 1261 } else if (v is ObservableMap) {
1260 _upgradeObservableMap(v, owner); 1262 _upgradeObservableMap(v, owner);
1261 } 1263 }
1262 } 1264 }
1263 } 1265 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698