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

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

Issue 524433002: Reapply "Give instances their own model class; move DartErrors out of instance-ref into their own e… (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/instance_ref.dart
diff --git a/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.dart b/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.dart
index 96bd2333691f483ba5cffe579f0b804adb528eeb..78c443699a3184b5b5712d8ae139fc95e7c50b55 100644
--- a/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.dart
@@ -37,20 +37,20 @@ class InstanceRefElement extends ServiceRefElement {
}
void expandEvent(bool expand, var done) {
- assert(ref is ServiceMap);
+ assert(ref is Instance);
if (expand) {
ref.reload().then((result) {
- if (result['valueAsString'] != null) {
- result.name = result['valueAsString'];
- result.vmName = result['valueAsString'];
+ if (result.valueAsString != null) {
+ result.name = result.valueAsString;
+ result.vmName = result.valueAsString;
}
ref = result;
notifyPropertyChange(#ref, 0, 1);
}).whenComplete(done);
} else {
- ServiceMap refMap = ref;
- refMap['fields'] = null;
- refMap['elements'] = null;
+ Instance refMap = ref;
+ refMap.fields = null;
+ refMap.elements = null;
done();
}
}

Powered by Google App Engine
This is Rietveld 408576698