Fix 'toplist by retained memory' in observatory
Prior to this fix I get errors like ``` TypeError: Instance of 'b2<bQ>': type 'b2<bQ>' is not a subtype of type 'List<bQ>' StackTrace: main.dart.js 1631:3 Object.m main.dart.js 2001:9 Object.p [...] ``` Change-Id: I2fc6329c05cb76bff76929aeee1eca3954fbc0a9 Reviewed-on: https://dart-review.googlesource.com/70501 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
032037681e
commit
3290f60a31
@@ -452,7 +452,7 @@ class ObjectGraph {
|
||||
new List<ObjectVertex>.from(vertices.where((u) => !u.isRoot));
|
||||
_mostRetained.sort((u, v) => v.retainedSize - u.retainedSize);
|
||||
|
||||
var result = _mostRetained;
|
||||
Iterable<ObjectVertex> result = _mostRetained;
|
||||
if (classId != null) {
|
||||
result = result.where((u) => u.vmCid == classId);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class HeapSnapshot implements M.HeapSnapshot {
|
||||
|
||||
List<Future<S.ServiceObject>> getMostRetained(S.Isolate isolate,
|
||||
{int classId, int limit}) {
|
||||
var result = [];
|
||||
List<Future<S.ServiceObject>> result = <Future<S.ServiceObject>>[];
|
||||
for (ObjectVertex v
|
||||
in graph.getMostRetained(classId: classId, limit: limit)) {
|
||||
result.add(
|
||||
|
||||
Reference in New Issue
Block a user