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

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

Issue 773573005: vmservice: basic object graph serialization. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 /// 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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); 1304 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner);
1305 1305
1306 ServiceEvent.vmDisconencted() : super._empty(null) { 1306 ServiceEvent.vmDisconencted() : super._empty(null) {
1307 eventType = 'VMDisconnected'; 1307 eventType = 'VMDisconnected';
1308 } 1308 }
1309 1309
1310 @observable String eventType; 1310 @observable String eventType;
1311 @observable ServiceMap breakpoint; 1311 @observable ServiceMap breakpoint;
1312 @observable ServiceMap exception; 1312 @observable ServiceMap exception;
1313 @observable ByteData data; 1313 @observable ByteData data;
1314 @observable int count;
1314 1315
1315 void _update(ObservableMap map, bool mapIsRef) { 1316 void _update(ObservableMap map, bool mapIsRef) {
1316 _loaded = true; 1317 _loaded = true;
1317 _upgradeCollection(map, owner); 1318 _upgradeCollection(map, owner);
1318 eventType = map['eventType']; 1319 eventType = map['eventType'];
1319 name = 'ServiceEvent $eventType'; 1320 name = 'ServiceEvent $eventType';
1320 vmName = name; 1321 vmName = name;
1321 if (map['breakpoint'] != null) { 1322 if (map['breakpoint'] != null) {
1322 breakpoint = map['breakpoint']; 1323 breakpoint = map['breakpoint'];
1323 } 1324 }
1324 if (map['exception'] != null) { 1325 if (map['exception'] != null) {
1325 exception = map['exception']; 1326 exception = map['exception'];
1326 } 1327 }
1327 if (map['_data'] != null) { 1328 if (map['_data'] != null) {
1328 data = map['_data']; 1329 data = map['_data'];
1329 } 1330 }
1331 if (map['count'] != null) {
1332 count = map['count'];
1333 }
1330 } 1334 }
1331 1335
1332 String toString() { 1336 String toString() {
1333 return 'ServiceEvent of type $eventType with ' 1337 return 'ServiceEvent of type $eventType with '
1334 '${data == null ? 0 : data.lengthInBytes} bytes of binary data'; 1338 '${data == null ? 0 : data.lengthInBytes} bytes of binary data';
1335 } 1339 }
1336 } 1340 }
1337 1341
1338 class Library extends ServiceObject with Coverage { 1342 class Library extends ServiceObject with Coverage {
1339 @observable String url; 1343 @observable String url;
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 var v = list[i]; 2729 var v = list[i];
2726 if ((v is ObservableMap) && _isServiceMap(v)) { 2730 if ((v is ObservableMap) && _isServiceMap(v)) {
2727 list[i] = owner.getFromMap(v); 2731 list[i] = owner.getFromMap(v);
2728 } else if (v is ObservableList) { 2732 } else if (v is ObservableList) {
2729 _upgradeObservableList(v, owner); 2733 _upgradeObservableList(v, owner);
2730 } else if (v is ObservableMap) { 2734 } else if (v is ObservableMap) {
2731 _upgradeObservableMap(v, owner); 2735 _upgradeObservableMap(v, owner);
2732 } 2736 }
2733 } 2737 }
2734 } 2738 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698