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 library code_ref_element; | 5 library code_ref_element; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'package:observatory/models.dart' as M | 9 import 'package:observatory/models.dart' as M |
10 show IsolateRef, CodeRef, isSyntheticCode; | 10 show IsolateRef, CodeRef, isSyntheticCode; |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 @override | 41 @override |
42 void attached() { | 42 void attached() { |
43 super.attached(); | 43 super.attached(); |
44 _r.enable(); | 44 _r.enable(); |
45 } | 45 } |
46 | 46 |
47 @override | 47 @override |
48 void detached() { | 48 void detached() { |
49 super.detached(); | 49 super.detached(); |
| 50 children = []; |
50 _r.disable(notify: true); | 51 _r.disable(notify: true); |
51 children = []; | |
52 } | 52 } |
53 | 53 |
54 void render() { | 54 void render() { |
55 final name = (_code.isOptimized ? '*' : '') + _code.name; | 55 final name = (_code.isOptimized ? '*' : '') + _code.name; |
56 children = [ | 56 children = [ |
57 new AnchorElement(href: M.isSyntheticCode(_code.kind) ? null | 57 new AnchorElement(href: M.isSyntheticCode(_code.kind) ? null |
58 : Uris.inspect(_isolate, object: _code)) | 58 : Uris.inspect(_isolate, object: _code)) |
59 ..text = name | 59 ..text = name |
60 ]; | 60 ]; |
61 } | 61 } |
62 } | 62 } |
OLD | NEW |