diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart index 3ccc6c349b2..044f123830e 100644 --- a/runtime/observatory/lib/object_graph.dart +++ b/runtime/observatory/lib/object_graph.dart @@ -452,7 +452,7 @@ class ObjectGraph { new List.from(vertices.where((u) => !u.isRoot)); _mostRetained.sort((u, v) => v.retainedSize - u.retainedSize); - var result = _mostRetained; + Iterable result = _mostRetained; if (classId != null) { result = result.where((u) => u.vmCid == classId); } diff --git a/runtime/observatory/lib/src/heap_snapshot/heap_snapshot.dart b/runtime/observatory/lib/src/heap_snapshot/heap_snapshot.dart index 9b90eaa8a03..130d56ce2fc 100644 --- a/runtime/observatory/lib/src/heap_snapshot/heap_snapshot.dart +++ b/runtime/observatory/lib/src/heap_snapshot/heap_snapshot.dart @@ -116,7 +116,7 @@ class HeapSnapshot implements M.HeapSnapshot { List> getMostRetained(S.Isolate isolate, {int classId, int limit}) { - var result = []; + List> result = >[]; for (ObjectVertex v in graph.getMostRetained(classId: classId, limit: limit)) { result.add(