| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 #include "vm/service_isolate.h" | 5 #include "vm/service_isolate.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 return isolate_ != NULL; | 106 return isolate_ != NULL; |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 bool ServiceIsolate::IsRunning() { | 110 bool ServiceIsolate::IsRunning() { |
| 111 MonitorLocker ml(monitor_); | 111 MonitorLocker ml(monitor_); |
| 112 return (port_ != ILLEGAL_PORT) && (isolate_ != NULL); | 112 return (port_ != ILLEGAL_PORT) && (isolate_ != NULL); |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 bool ServiceIsolate::IsServiceIsolate(Isolate* isolate) { | 116 bool ServiceIsolate::IsServiceIsolate(const Isolate* isolate) { |
| 117 MonitorLocker ml(monitor_); | 117 MonitorLocker ml(monitor_); |
| 118 return isolate == isolate_; | 118 return isolate == isolate_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 bool ServiceIsolate::IsServiceIsolateDescendant(Isolate* isolate) { | 122 bool ServiceIsolate::IsServiceIsolateDescendant(const Isolate* isolate) { |
| 123 MonitorLocker ml(monitor_); | 123 MonitorLocker ml(monitor_); |
| 124 return isolate->origin_id() == origin_; | 124 return isolate->origin_id() == origin_; |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 Dart_Port ServiceIsolate::Port() { | 128 Dart_Port ServiceIsolate::Port() { |
| 129 MonitorLocker ml(monitor_); | 129 MonitorLocker ml(monitor_); |
| 130 return port_; | 130 return port_; |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 ASSERT(!result.IsNull()); | 517 ASSERT(!result.IsNull()); |
| 518 Dart_Port port = ILLEGAL_PORT; | 518 Dart_Port port = ILLEGAL_PORT; |
| 519 if (result.IsReceivePort()) { | 519 if (result.IsReceivePort()) { |
| 520 port = ReceivePort::Cast(result).Id(); | 520 port = ReceivePort::Cast(result).Id(); |
| 521 } | 521 } |
| 522 ASSERT(port != ILLEGAL_PORT); | 522 ASSERT(port != ILLEGAL_PORT); |
| 523 ServiceIsolate::SetServicePort(port); | 523 ServiceIsolate::SetServicePort(port); |
| 524 } | 524 } |
| 525 | 525 |
| 526 } // namespace dart | 526 } // namespace dart |
| OLD | NEW |