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

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

Issue 2271653003: Fixed crash during retainedTopList computation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 849c3769293337740867dd46e54a2b2f083affb3..d883fb27c86306e8a2698d93479196a4410618cf 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -41,19 +41,14 @@ class ClassViewElement extends ObservatoryElement {
});
}
- Future<ServiceObject> retainedToplist(var limit) {
- return cls.isolate.fetchHeapSnapshot(true).last
- .then((RawHeapSnapshot raw) async {
- final snapshot = new HeapSnapshot();
- await snapshot.loadProgress(cls.isolate, raw);
- return snapshot;
- })
- .then((HeapSnapshot snapshot) =>
- Future.wait(snapshot.getMostRetained(cls.isolate, classId: cls.vmCid,
- limit: 10)))
- .then((List<ServiceObject> most) {
- mostRetained = new ObservableList.from(most);
- });
+ Future retainedToplist(var limit) async {
+ final raw = await cls.isolate.fetchHeapSnapshot(true).last;
+ final snapshot = new HeapSnapshot();
+ await snapshot.loadProgress(cls.isolate, raw).last;
+ final most = await Future.wait(snapshot.getMostRetained(cls.isolate,
+ classId: cls.vmCid,
+ limit: 10));
+ mostRetained = new ObservableList.from(most);
}
// TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698