| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 | 169 |
| 170 Dart_Port ServiceIsolate::Port() { | 170 Dart_Port ServiceIsolate::Port() { |
| 171 MonitorLocker ml(monitor_); | 171 MonitorLocker ml(monitor_); |
| 172 return port_; | 172 return port_; |
| 173 } | 173 } |
| 174 | 174 |
| 175 | 175 |
| 176 Dart_Port ServiceIsolate::WaitForLoadPort() { | 176 Dart_Port ServiceIsolate::WaitForLoadPort() { |
| 177 MonitorLocker ml(monitor_); | 177 MonitorLocker ml(monitor_); |
| 178 | |
| 179 while (initializing_ && (load_port_ == ILLEGAL_PORT)) { | 178 while (initializing_ && (load_port_ == ILLEGAL_PORT)) { |
| 180 ml.Wait(); | 179 ml.Wait(); |
| 181 } | 180 } |
| 182 | |
| 183 return load_port_; | 181 return load_port_; |
| 184 } | 182 } |
| 185 | 183 |
| 186 | 184 |
| 187 Dart_Port ServiceIsolate::LoadPort() { | 185 Dart_Port ServiceIsolate::LoadPort() { |
| 188 MonitorLocker ml(monitor_); | 186 MonitorLocker ml(monitor_); |
| 189 return load_port_; | 187 return load_port_; |
| 190 } | 188 } |
| 191 | 189 |
| 192 | 190 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 port = ReceivePort::Cast(result).Id(); | 547 port = ReceivePort::Cast(result).Id(); |
| 550 } | 548 } |
| 551 ASSERT(port != ILLEGAL_PORT); | 549 ASSERT(port != ILLEGAL_PORT); |
| 552 ServiceIsolate::SetServicePort(port); | 550 ServiceIsolate::SetServicePort(port); |
| 553 } | 551 } |
| 554 | 552 |
| 555 | 553 |
| 556 void ServiceIsolate::VisitObjectPointers(ObjectPointerVisitor* visitor) {} | 554 void ServiceIsolate::VisitObjectPointers(ObjectPointerVisitor* visitor) {} |
| 557 | 555 |
| 558 } // namespace dart | 556 } // namespace dart |
| OLD | NEW |