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

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

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 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/observatory/lib/src/elements/top_retaining_instances.dart
diff --git a/runtime/observatory/lib/src/elements/top_retaining_instances.dart b/runtime/observatory/lib/src/elements/top_retaining_instances.dart
index 3f72d3b23a63f3916e347aff8975b3c1ff716cb3..0d3240481531fddbe85f117ce2997fd47a91a5f0 100644
--- a/runtime/observatory/lib/src/elements/top_retaining_instances.dart
+++ b/runtime/observatory/lib/src/elements/top_retaining_instances.dart
@@ -14,16 +14,13 @@ import 'package:observatory/utils.dart';
class TopRetainingInstancesElement extends HtmlElement implements Renderable {
static const tag = const Tag<TopRetainingInstancesElement>(
- 'top-retainig-instances',
- dependencies: const [
- CurlyBlockElement.tag,
- InstanceRefElement.tag
- ]);
+ 'top-retainig-instances',
+ dependencies: const [CurlyBlockElement.tag, InstanceRefElement.tag]);
RenderingScheduler<TopRetainingInstancesElement> _r;
Stream<RenderedEvent<TopRetainingInstancesElement>> get onRendered =>
- _r.onRendered;
+ _r.onRendered;
M.IsolateRef _isolate;
M.ClassRef _cls;
@@ -35,7 +32,9 @@ class TopRetainingInstancesElement extends HtmlElement implements Renderable {
M.IsolateRef get isolate => _isolate;
M.ClassRef get cls => _cls;
- factory TopRetainingInstancesElement(M.IsolateRef isolate, M.ClassRef cls,
+ factory TopRetainingInstancesElement(
+ M.IsolateRef isolate,
+ M.ClassRef cls,
M.TopRetainingInstancesRepository topRetainingInstances,
M.InstanceRepository instances,
{RenderingQueue queue}) {
@@ -71,7 +70,8 @@ class TopRetainingInstancesElement extends HtmlElement implements Renderable {
children = [
new CurlyBlockElement(expanded: _expanded, queue: _r.queue)
..content = [
- new DivElement()..classes = ['memberList']
+ new DivElement()
+ ..classes = ['memberList']
..children = _createContent()
]
..onToggle.listen((e) async {
@@ -93,20 +93,21 @@ class TopRetainingInstancesElement extends HtmlElement implements Renderable {
List<Element> _createContent() {
if (_topRetaining == null) {
- return [
- new SpanElement()..text = 'Loading...'
- ];
+ return [new SpanElement()..text = 'Loading...'];
}
- return _topRetaining.map((r) =>
- new DivElement()..classes = ['memberItem']
- ..children = [
- new DivElement()..classes = ['memberName']
- ..text = '${Utils.formatSize(r.retainedSize)} ',
- new DivElement()..classes = ['memberValue']
- ..children = [
- anyRef(_isolate, r.object, _instances, queue: _r.queue)
- ]
- ]
- ).toList();
+ return _topRetaining
+ .map((r) => new DivElement()
+ ..classes = ['memberItem']
+ ..children = [
+ new DivElement()
+ ..classes = ['memberName']
+ ..text = '${Utils.formatSize(r.retainedSize)} ',
+ new DivElement()
+ ..classes = ['memberValue']
+ ..children = [
+ anyRef(_isolate, r.object, _instances, queue: _r.queue)
+ ]
+ ])
+ .toList();
}
}

Powered by Google App Engine
This is Rietveld 408576698