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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 2005983002: Make the object store visible in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing files Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « runtime/observatory/lib/src/elements/service_view.dart ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698