Index: runtime/observatory/lib/src/service/object.dart |
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart |
index b0be812dc5b88e1141fcadebd860afe5a48b0ae2..cb0f4c57611c3cf3d1383889acfd6571b26fa951 100644 |
--- a/runtime/observatory/lib/src/service/object.dart |
+++ b/runtime/observatory/lib/src/service/object.dart |
@@ -253,6 +253,9 @@ abstract class ServiceObject extends Observable { |
break; |
} |
break; |
+ case '_ObjectStore': |
+ obj = new ObjectStore._empty(owner); |
+ break; |
case 'Event': |
obj = new ServiceEvent._empty(owner); |
break; |
@@ -1334,6 +1337,7 @@ class Isolate extends ServiceObjectOwner { |
Map<int, Class> _classesByCid = new Map<int, Class>(); |
@observable Library rootLibrary; |
+ @observable ObjectStore objectStore; |
@observable ObservableList<Library> libraries = |
new ObservableList<Library>(); |
@observable Frame topFrame; |
@@ -1415,6 +1419,7 @@ class Isolate extends ServiceObjectOwner { |
_upgradeCollection(map, isolate); |
originNumber = int.parse(map['_originNumber'], onError:(_) => null); |
rootLibrary = map['rootLib']; |
+ objectStore = map['_objectStore']; |
if (map['entry'] != null) { |
entry = map['entry']; |
} |
@@ -1744,6 +1749,36 @@ class Isolate extends ServiceObjectOwner { |
String toString() => "Isolate($name)"; |
} |
+ |
+class NamedField { |
+ final String name; |
+ final ServiceObject value; |
+ NamedField(this.name, this.value); |
+} |
+ |
+ |
+class ObjectStore extends ServiceObject { |
+ @observable List<NamedField> fields = new List<NamedField>(); |
+ |
+ ObjectStore._empty(ServiceObjectOwner owner) : super._empty(owner); |
+ |
+ void _update(ObservableMap map, bool mapIsRef) { |
+ // Extract full properties. |
+ _upgradeCollection(map, isolate); |
+ |
+ if (mapIsRef) { |
+ return; |
+ } |
+ |
+ fields.clear(); |
+ map['fields'].forEach((key, value) { |
+ fields.add(new NamedField(key, value)); |
+ }); |
+ _loaded = true; |
+ } |
+} |
+ |
+ |
/// A [ServiceObject] which implements [ObservableMap]. |
class ServiceMap extends ServiceObject implements ObservableMap { |
final ObservableMap _map = new ObservableMap(); |