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

Unified Diff: runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart

Issue 532063002: Teach the Observatory about Contexts. Factor out object graph information from the instance view. (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
Index: runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart
diff --git a/runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart b/runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart
index 436c7b551b842fc904da1041174253c4149febe9..047b8334715b11669f32ffed3330a243a800046d 100644
--- a/runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/elements/inbound_reference.dart
@@ -7,18 +7,18 @@ library inbound_reference_element;
import 'dart:async';
import 'package:polymer/polymer.dart';
import 'package:observatory/service.dart';
-import 'service_ref.dart';
+import 'observatory_element.dart';
@CustomTag('inbound-reference')
-class InboundReferenceElement extends ServiceRefElement {
+class InboundReferenceElement extends ObservatoryElement {
@published ObservableMap ref;
InboundReferenceElement.created() : super.created();
- dynamic get slot => (ref as ServiceMap)['slot'];
+ dynamic get slot => ref['slot'];
bool get slotIsArrayIndex => slot is num;
bool get slotIsField => slot is ServiceMap && slot['type'] == '@Field';
- ServiceObject get source => (ref as ServiceMap)['source'];
+ ServiceObject get source => ref['source'];
// I.e., inbound references to 'source' for recursive pointer chasing.
@observable ObservableList inboundReferences;
@@ -34,15 +34,14 @@ class InboundReferenceElement extends ServiceRefElement {
return expandEvent;
}
- void expandEvent(bool expand, var done) {
- assert(ref is ServiceMap);
+ void expandEvent(bool expand, Function onDone) {
if (expand) {
fetchInboundReferences(100).then((result) {
notifyPropertyChange(#ref, 0, 1);
- }).whenComplete(done);
+ }).whenComplete(onDone);
} else {
inboundReferences = null;
- done();
+ onDone();
}
}
}

Powered by Google App Engine
This is Rietveld 408576698