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 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:observatory/models.dart' as M show Sentinel, SentinelKind; | 7 import 'package:observatory/models.dart' as M show Sentinel, SentinelKind; |
8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
9 import 'package:observatory/src/elements/helpers/tag.dart'; | 9 import 'package:observatory/src/elements/helpers/tag.dart'; |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 text = _sentinel.valueAsString; | 47 text = _sentinel.valueAsString; |
48 title = _sentinelKindToDescription(_sentinel.kind); | 48 title = _sentinelKindToDescription(_sentinel.kind); |
49 } | 49 } |
50 | 50 |
51 static String _sentinelKindToDescription(M.SentinelKind kind) { | 51 static String _sentinelKindToDescription(M.SentinelKind kind) { |
52 switch (kind) { | 52 switch (kind) { |
53 case M.SentinelKind.collected: | 53 case M.SentinelKind.collected: |
54 return 'This object has been reclaimed by the garbage collector.'; | 54 return 'This object has been reclaimed by the garbage collector.'; |
55 case M.SentinelKind.expired: | 55 case M.SentinelKind.expired: |
56 return 'The handle to this object has expired. ' | 56 return 'The handle to this object has expired. ' |
57 'Consider refreshing the page.'; | 57 'Consider refreshing the page.'; |
58 case M.SentinelKind.notInitialized: | 58 case M.SentinelKind.notInitialized: |
59 return 'This object will be initialized once it is accessed by ' | 59 return 'This object will be initialized once it is accessed by ' |
60 'the program.'; | 60 'the program.'; |
61 case M.SentinelKind.initializing: | 61 case M.SentinelKind.initializing: |
62 return 'This object is currently being initialized.'; | 62 return 'This object is currently being initialized.'; |
63 case M.SentinelKind.optimizedOut: | 63 case M.SentinelKind.optimizedOut: |
64 return 'This object is no longer needed and has been removed by the ' | 64 return 'This object is no longer needed and has been removed by the ' |
65 'optimizing compiler.'; | 65 'optimizing compiler.'; |
66 case M.SentinelKind.free: | 66 case M.SentinelKind.free: |
67 return ''; | 67 return ''; |
68 } | 68 } |
69 throw new Exception('Unknown SentinelKind: $kind'); | 69 throw new Exception('Unknown SentinelKind: $kind'); |
70 } | 70 } |
71 | |
72 } | 71 } |
OLD | NEW |