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

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

Issue 536273002: Teach the Observatory about WeakProperties (ephemerons). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/service_view.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/observatory/lib/src/service/object.dart
diff --git a/runtime/bin/vmservice/observatory/lib/src/service/object.dart b/runtime/bin/vmservice/observatory/lib/src/service/object.dart
index 2e92b8b2fa4b477b45dd345aabbcf38a14c30fcb..ef4b68a1a22d53774c0024a34caa86639b7cdfd6 100644
--- a/runtime/bin/vmservice/observatory/lib/src/service/object.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/service/object.dart
@@ -50,6 +50,7 @@ abstract class ServiceObject extends Observable {
bool get isSentinel => vmType == 'Sentinel';
bool get isString => vmType == 'String';
bool get isType => vmType == 'Type';
+ bool get isWeakProperty => vmType == 'WeakProperty';
/// The complete service url of this object.
@reflectable String get link => _owner.relativeLink(_id);
@@ -120,6 +121,7 @@ abstract class ServiceObject extends Observable {
case 'Smi':
case 'String':
case 'Type':
+ case 'WeakProperty':
obj = new Instance._empty(owner);
break;
case 'Isolate':
@@ -1487,6 +1489,8 @@ class Instance extends ServiceObject {
@observable var nativeFields;
@observable var elements;
@observable var userName;
+ @observable Instance key; // If a WeakProperty.
+ @observable Instance value; // If a WeakProperty.
Cutch 2014/09/04 15:27:24 I wonder if we should start subclassing Instance s
rmacnak 2014/09/04 20:36:07 Right, and there are a lot more special Instance t
bool get isClosure => closureFunc != null;
@@ -1513,6 +1517,8 @@ class Instance extends ServiceObject {
elements = map['elements'];
typeClass = map['type_class'];
userName = map['user_name'];
+ key = map['key'];
+ value = map['value'];
// We are fully loaded.
_loaded = true;
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/service_view.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698