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

Side by Side Diff: runtime/observatory/lib/src/elements/retaining_path.dart

Issue 2277093002: Supporting both FieldRef and InstanceRef in RetainingPathItem.parentField (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/models/objects/retaining_path.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/curly_block.dart'; 8 import 'package:observatory/src/elements/curly_block.dart';
9 import 'package:observatory/src/elements/instance_ref.dart'; 9 import 'package:observatory/src/elements/instance_ref.dart';
10 import 'package:observatory/src/elements/helpers/any_ref.dart'; 10 import 'package:observatory/src/elements/helpers/any_ref.dart';
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 ]; 92 ];
93 } 93 }
94 return _path.elements.map(_createItem).toList(); 94 return _path.elements.map(_createItem).toList();
95 } 95 }
96 96
97 Element _createItem(M.RetainingPathItem item) { 97 Element _createItem(M.RetainingPathItem item) {
98 final content = <Element>[]; 98 final content = <Element>[];
99 99
100 if (item.parentField != null) { 100 if (item.parentField != null) {
101 content.add( 101 content.add(
102 new DivElement() 102 new SpanElement()
103 ..children = [ 103 ..children = [
104 new SpanElement()..text = 'from ', 104 new SpanElement()..text = 'from ',
105 new InstanceRefElement(_isolate, item.parentField, _instances, 105 anyRef(_isolate, item.parentField, _instances, queue: _r.queue),
106 queue: _r.queue),
107 new SpanElement()..text = ' of ', 106 new SpanElement()..text = ' of ',
108 ]); 107 ]);
109 } else if (item.parentListIndex != null) { 108 } else if (item.parentListIndex != null) {
110 content.add( 109 content.add(
111 new SpanElement() 110 new SpanElement()
112 ..text = 'from [ ${item.parentListIndex} ] of '); 111 ..text = 'from [ ${item.parentListIndex} ] of ');
113 } else if (item.parentWordOffset != null) { 112 } else if (item.parentWordOffset != null) {
114 content.add( 113 content.add(
115 new SpanElement() 114 new SpanElement()
116 ..text = 'from word [ ${item.parentWordOffset} ] of '); 115 ..text = 'from word [ ${item.parentWordOffset} ] of ');
117 } else { 116 } else {
118 content.add(new SpanElement()..text = 'from '); 117 content.add(new SpanElement()..text = 'from ');
119 } 118 }
120 119
121 content.add( 120 content.add(
122 anyRef(_isolate, item.source, _instances, queue: _r.queue) 121 anyRef(_isolate, item.source, _instances, queue: _r.queue)
123 ); 122 );
124 123
125 return new DivElement()..classes = ['indent']..children = content; 124 return new DivElement()..classes = ['indent']..children = content;
126 } 125 }
127 } 126 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/models/objects/retaining_path.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698