OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
8 import 'package:observatory/src/elements/class_ref.dart'; | 8 import 'package:observatory/src/elements/class_ref.dart'; |
9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
10 import 'package:observatory/src/elements/helpers/tag.dart'; | 10 import 'package:observatory/src/elements/helpers/tag.dart'; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 ..children = [ | 104 ..children = [ |
105 new ClassRefElement(_isolate, _object.clazz, queue: _r.queue) | 105 new ClassRefElement(_isolate, _object.clazz, queue: _r.queue) |
106 ] | 106 ] |
107 ], | 107 ], |
108 new DivElement()..classes = const ['memberItem'] | 108 new DivElement()..classes = const ['memberItem'] |
109 ..title = 'Space for this object in memory' | 109 ..title = 'Space for this object in memory' |
110 ..children = [ | 110 ..children = [ |
111 new DivElement()..classes = const ['memberName'] | 111 new DivElement()..classes = const ['memberName'] |
112 ..text = 'Shallow size ', | 112 ..text = 'Shallow size ', |
113 new DivElement()..classes = const ['memberValue'] | 113 new DivElement()..classes = const ['memberValue'] |
114 ..text = Utils.formatSize(_object.size) | 114 ..text = Utils.formatSize(_object.size ?? 0) |
115 ], | 115 ], |
116 new DivElement()..classes = const ['memberItem'] | 116 new DivElement()..classes = const ['memberItem'] |
117 ..title = 'Space reachable from this object, ' | 117 ..title = 'Space reachable from this object, ' |
118 'excluding class references' | 118 'excluding class references' |
119 ..children = [ | 119 ..children = [ |
120 new DivElement()..classes = const ['memberName'] | 120 new DivElement()..classes = const ['memberName'] |
121 ..text = 'Reachable size ', | 121 ..text = 'Reachable size ', |
122 new DivElement()..classes = const ['memberValue'] | 122 new DivElement()..classes = const ['memberValue'] |
123 ..children = _createReachableSizeValue() | 123 ..children = _createReachableSizeValue() |
124 ], | 124 ], |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 button.onClick.listen((_) async { | 205 button.onClick.listen((_) async { |
206 button.disabled = true; | 206 button.disabled = true; |
207 _loadingRetainedBytes = true; | 207 _loadingRetainedBytes = true; |
208 _retainedSize = await _retainedSizes.get(_isolate, _object.id); | 208 _retainedSize = await _retainedSizes.get(_isolate, _object.id); |
209 _r.dirty(); | 209 _r.dirty(); |
210 }); | 210 }); |
211 content.add(button); | 211 content.add(button); |
212 return content; | 212 return content; |
213 } | 213 } |
214 } | 214 } |
OLD | NEW |