| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 part of service; | 5 part of service; |
| 6 | 6 |
| 7 /// A [ServiceObject] is an object known to the VM service and is tied | 7 /// A [ServiceObject] is an object known to the VM service and is tied |
| 8 /// to an owning [Isolate]. | 8 /// to an owning [Isolate]. |
| 9 abstract class ServiceObject extends Observable { | 9 abstract class ServiceObject extends Observable { |
| 10 Isolate _isolate; | 10 Isolate _isolate; |
| 11 | 11 |
| 12 /// Owning isolate. | 12 /// Owning isolate. |
| 13 @reflectable Isolate get isolate => _isolate; | 13 @reflectable Isolate get isolate => _isolate; |
| 14 | 14 |
| 15 /// Owning vm. | 15 /// Owning vm. |
| 16 @reflectable VM get vm => _isolate.vm; | 16 @reflectable VM get vm => _isolate.vm; |
| 17 | 17 |
| 18 /// The complete service url of this object. | 18 /// The complete service url of this object. |
| 19 @reflectable String get link => isolate.relativeLink(_id); | 19 @reflectable String get link => isolate.relativeLink(_id); |
| 20 | 20 |
| 21 /// The complete service url of this object with a '#/' prefix. | 21 /// The complete service url of this object with a '#/' prefix. |
| 22 @reflectable String get hashLink => isolate.relativeHashLink(_id); | 22 @reflectable String get hashLink => isolate.relativeHashLink(_id); |
| 23 set hashLink(var o) { /* silence polymer */ } |
| 23 | 24 |
| 24 String _id; | 25 String _id; |
| 25 /// The id of this object. | 26 /// The id of this object. |
| 26 @reflectable String get id => _id; | 27 @reflectable String get id => _id; |
| 27 | 28 |
| 28 String _serviceType; | 29 String _serviceType; |
| 29 /// The service type of this object. | 30 /// The service type of this object. |
| 30 @reflectable String get serviceType => _serviceType; | 31 @reflectable String get serviceType => _serviceType; |
| 31 | 32 |
| 32 bool _ref; | 33 bool _ref; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 return isolate.scripts.putIfAbsent(m); | 176 return isolate.scripts.putIfAbsent(m); |
| 176 case 'Code': | 177 case 'Code': |
| 177 return isolate.codes.putIfAbsent(m); | 178 return isolate.codes.putIfAbsent(m); |
| 178 case 'Isolate': | 179 case 'Isolate': |
| 179 return vm.isolates.getIsolateFromMap(m); | 180 return vm.isolates.getIsolateFromMap(m); |
| 180 case 'Class': | 181 case 'Class': |
| 181 return isolate.classes.putIfAbsent(m); | 182 return isolate.classes.putIfAbsent(m); |
| 182 } | 183 } |
| 183 return new ServiceMap.fromMap(isolate, m); | 184 return new ServiceMap.fromMap(isolate, m); |
| 184 } | 185 } |
| OLD | NEW |