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

Unified Diff: runtime/observatory/lib/src/elements/class_view.dart

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 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/elements/class_view.dart
diff --git a/runtime/observatory/lib/src/elements/class_view.dart b/runtime/observatory/lib/src/elements/class_view.dart
index ac49f7ab6c2b607ce424fd64199fbaf2bfc2dcaa..7220cca755baf7e9762ccb7ecf517aff1eebaa1d 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -28,13 +28,13 @@ class ClassViewElement extends ObservatoryElement {
}
Future<ServiceObject> retainedToplist(var limit) {
- return cls.isolate.fetchHeapSnapshot().then(
- (HeapSnapshot snapshot) =>
- Future.wait(snapshot.getMostRetained(classId: cls.vmCid,
- limit: 10))).then(
- (List<ServiceObject> most) {
- mostRetained = new ObservableList.from(most);
- });
+ return cls.isolate.fetchHeapSnapshot()
+ .then((HeapSnapshot snapshot) =>
+ Future.wait(snapshot.getMostRetained(classId: cls.vmCid,
+ limit: 10)))
+ .then((List<ServiceObject> most) {
+ mostRetained = new ObservableList.from(most);
+ });
}
// TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
@@ -44,14 +44,14 @@ class ClassViewElement extends ObservatoryElement {
});
}
- void refresh(var done) {
+ Future refresh() {
instances = null;
retainedBytes = null;
mostRetained = null;
- cls.reload().whenComplete(done);
+ return cls.reload();
}
- void refreshCoverage(var done) {
- cls.refreshCoverage().whenComplete(done);
+ Future refreshCoverage() {
+ return cls.refreshCoverage();
}
}
« no previous file with comments | « runtime/observatory/lib/src/elements/action_link.html ('k') | runtime/observatory/lib/src/elements/code_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698