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

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

Issue 1439893002: - Annotate instructions that load objects from the ObjectPool or Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 library service_ref_element; 5 library service_ref_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
10 import 'observatory_element.dart'; 10 import 'observatory_element.dart';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (ref == null) { 49 if (ref == null) {
50 return 'NULL REF'; 50 return 'NULL REF';
51 } 51 }
52 return ref.name; 52 return ref.name;
53 } 53 }
54 54
55 // Workaround isEmpty not being useable due to missing @MirrorsUsed. 55 // Workaround isEmpty not being useable due to missing @MirrorsUsed.
56 bool get nameIsEmpty { 56 bool get nameIsEmpty {
57 return (name == null) || name.isEmpty; 57 return (name == null) || name.isEmpty;
58 } 58 }
59
60
61 @published bool expanded = false;
62 dynamic expander() {
63 return expandEvent;
64 }
65 void expandEvent(bool expand, Function onDone) {
66 if (expand) {
67 ref.reload().then((result) {
68 ref = result;
69 notifyPropertyChange(#ref, 0, 1);
70 expanded = true;
71 }).whenComplete(onDone);
72 } else {
73 expanded = false;
74 onDone();
75 }
76 }
59 } 77 }
60 78
61 79
62 @CustomTag('any-service-ref') 80 @CustomTag('any-service-ref')
63 class AnyServiceRefElement extends ObservatoryElement { 81 class AnyServiceRefElement extends ObservatoryElement {
64 @published ServiceObject ref; 82 @published ServiceObject ref;
65 @published String expandKey; 83 @published String expandKey;
66 AnyServiceRefElement.created() : super.created(); 84 AnyServiceRefElement.created() : super.created();
67 85
68 Element _constructElementForRef() { 86 Element _constructElementForRef() {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return; 151 return;
134 } 152 }
135 children.add(element); 153 children.add(element);
136 } 154 }
137 } 155 }
138 156
139 @CustomTag('object-ref') 157 @CustomTag('object-ref')
140 class ObjectRefElement extends ServiceRefElement { 158 class ObjectRefElement extends ServiceRefElement {
141 ObjectRefElement.created() : super.created(); 159 ObjectRefElement.created() : super.created();
142 } 160 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/function_view.html ('k') | runtime/observatory/lib/src/elements/service_ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698