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

Side by Side Diff: runtime/observatory/lib/src/elements/helpers/any_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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/instance_ref.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) 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 'package:observatory/models.dart' as M; 6 import 'package:observatory/models.dart' as M;
7 import 'package:observatory/src/elements/class_ref.dart'; 7 import 'package:observatory/src/elements/class_ref.dart';
8 import 'package:observatory/src/elements/code_ref.dart'; 8 import 'package:observatory/src/elements/code_ref.dart';
9 import 'package:observatory/src/elements/context_ref.dart'; 9 import 'package:observatory/src/elements/context_ref.dart';
10 import 'package:observatory/src/elements/error_ref.dart'; 10 import 'package:observatory/src/elements/error_ref.dart';
(...skipping 10 matching lines...) Expand all
21 import 'package:observatory/src/elements/pc_descriptors_ref.dart'; 21 import 'package:observatory/src/elements/pc_descriptors_ref.dart';
22 import 'package:observatory/src/elements/script_ref.dart'; 22 import 'package:observatory/src/elements/script_ref.dart';
23 import 'package:observatory/src/elements/sentinel_value.dart'; 23 import 'package:observatory/src/elements/sentinel_value.dart';
24 import 'package:observatory/src/elements/type_arguments_ref.dart'; 24 import 'package:observatory/src/elements/type_arguments_ref.dart';
25 import 'package:observatory/src/elements/token_stream_ref.dart'; 25 import 'package:observatory/src/elements/token_stream_ref.dart';
26 import 'package:observatory/src/elements/unknown_ref.dart'; 26 import 'package:observatory/src/elements/unknown_ref.dart';
27 27
28 Element anyRef(M.IsolateRef isolate, ref, 28 Element anyRef(M.IsolateRef isolate, ref,
29 M.InstanceRepository instances, {RenderingQueue queue}) { 29 M.InstanceRepository instances, {RenderingQueue queue}) {
30 if (ref is M.Guarded) { 30 if (ref is M.Guarded) {
31 return anyRef(isolate, ref.asSentinel ?? ref.asValue, instances, 31 if (ref.isSentinel) {
32 queue: queue); 32 return anyRef(isolate, ref.asSentinel, instances, queue: queue);
33 } else {
34 return anyRef(isolate, ref.asValue, instances, queue: queue);
35 }
33 } else if (ref is M.ObjectRef) { 36 } else if (ref is M.ObjectRef) {
34 if (ref is M.ClassRef) { 37 if (ref is M.ClassRef) {
35 return new ClassRefElement(isolate, ref, queue: queue); 38 return new ClassRefElement(isolate, ref, queue: queue);
36 } else if (ref is M.CodeRef) { 39 } else if (ref is M.CodeRef) {
37 return new CodeRefElement(isolate, ref, queue: queue); 40 return new CodeRefElement(isolate, ref, queue: queue);
38 } else if (ref is M.ContextRef) { 41 } else if (ref is M.ContextRef) {
39 return new ContextRefElement(isolate, ref, queue: queue); 42 return new ContextRefElement(isolate, ref, queue: queue);
40 } else if (ref is M.Error ) { 43 } else if (ref is M.Error ) {
41 return new ErrorRefElement(ref, queue: queue); 44 return new ErrorRefElement(ref, queue: queue);
42 } else if (ref is M.FieldRef) { 45 } else if (ref is M.FieldRef) {
(...skipping 22 matching lines...) Expand all
65 return new TokenStreamRefElement(isolate, ref, queue: queue); 68 return new TokenStreamRefElement(isolate, ref, queue: queue);
66 } else if (ref is M.UnknownObjectRef) { 69 } else if (ref is M.UnknownObjectRef) {
67 return new UnknownObjectRefElement(isolate, ref, queue: queue); 70 return new UnknownObjectRefElement(isolate, ref, queue: queue);
68 } else { 71 } else {
69 return new AnchorElement(href: Uris.inspect(isolate, object: ref)) 72 return new AnchorElement(href: Uris.inspect(isolate, object: ref))
70 ..text = 'object'; 73 ..text = 'object';
71 } 74 }
72 } else if (ref is M.Sentinel) { 75 } else if (ref is M.Sentinel) {
73 return new SentinelValueElement(ref, queue: queue); 76 return new SentinelValueElement(ref, queue: queue);
74 } 77 }
75 throw new Exception('Unknown runtimeType (${ref.runtimeType})'); 78 throw new Exception('Unknown ref type (${ref.runtimeType})');
76 } 79 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/instance_ref.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698