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

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

Issue 2342943002: Observatory: Fix instance view of lists. (Closed)
Patch Set: 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/instance_ref.dart
diff --git a/runtime/observatory/lib/src/elements/instance_ref.dart b/runtime/observatory/lib/src/elements/instance_ref.dart
index f54b41b18279112e0ab55a1147372c7594750d2c..536f21bf61fd4322f54751b0e87c15795a667cf4 100644
--- a/runtime/observatory/lib/src/elements/instance_ref.dart
+++ b/runtime/observatory/lib/src/elements/instance_ref.dart
@@ -244,39 +244,24 @@ class InstanceRefElement extends HtmlElement implements Renderable {
new FieldRefElement(_isolate, f.decl, _instances,
queue: _r.queue),
new SpanElement()..text = ' = ',
- f.value.isSentinel
- ? new SentinelValueElement(f.value.asSentinel, queue: _r.queue)
- : new InstanceRefElement(_isolate, f.value.asValue, _instances,
- queue: _r.queue)
+ anyRef(_isolate, f.value, _instances, queue: _r.queue)
]).toList();
case M.InstanceKind.list:
var index = 0;
- return _loadedInstance.elements.map((e) =>
+ return _loadedInstance.elements.map((element) =>
new DivElement()
..children = [
new SpanElement()..text = '[ ${index++} ] : ',
- e.isSentinel
- ? new SentinelValueElement(e.asSentinel, queue: _r.queue)
- : anyRef(_isolate, e.asValue, _instances, queue: _r.queue)
- // should be:
- // new InstanceRefElement(_isolate, e.asValue, _instances,
- // queue: _r.queue)
- // in some situations we obtain values that are not InstanceRef.
+ anyRef(_isolate, element, _instances, queue: _r.queue)
]).toList()..addAll(_createShowMoreButton());
case M.InstanceKind.map:
- return _loadedInstance.associations.map((a) =>
+ return _loadedInstance.associations.map((association) =>
new DivElement()
..children = [
new SpanElement()..text = '[ ',
- a.key.isSentinel
- ? new SentinelValueElement(a.key.asSentinel, queue: _r.queue)
- : new InstanceRefElement(_isolate, a.key.asValue, _instances,
- queue: _r.queue),
+ anyRef(_isolate, association.key, _instances, queue: _r.queue),
new SpanElement()..text = ' ] : ',
- a.value.isSentinel
- ? new SentinelValueElement(a.value.asSentinel, queue: _r.queue)
- : new InstanceRefElement(_isolate, a.value.asValue, _instances,
- queue: _r.queue)
+ anyRef(_isolate, association.value, _instances, queue: _r.queue)
]).toList()..addAll(_createShowMoreButton());
case M.InstanceKind.uint8ClampedList:
case M.InstanceKind.uint8List:
« no previous file with comments | « runtime/observatory/lib/src/elements/helpers/any_ref.dart ('k') | runtime/observatory/lib/src/elements/instance_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698