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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 MonitorLocker ml(monitor_); | 295 MonitorLocker ml(monitor_); |
296 initializing_ = false; | 296 initializing_ = false; |
297 ml.NotifyAll(); | 297 ml.NotifyAll(); |
298 } | 298 } |
299 | 299 |
300 | 300 |
301 class RunServiceTask : public ThreadPool::Task { | 301 class RunServiceTask : public ThreadPool::Task { |
302 public: | 302 public: |
303 virtual void Run() { | 303 virtual void Run() { |
304 ASSERT(Isolate::Current() == NULL); | 304 ASSERT(Isolate::Current() == NULL); |
| 305 #ifndef PRODUCT |
305 TimelineDurationScope tds(Timeline::GetVMStream(), | 306 TimelineDurationScope tds(Timeline::GetVMStream(), |
306 "ServiceIsolateStartup"); | 307 "ServiceIsolateStartup"); |
| 308 #endif // !PRODUCT |
307 char* error = NULL; | 309 char* error = NULL; |
308 Isolate* isolate = NULL; | 310 Isolate* isolate = NULL; |
309 | 311 |
310 Dart_IsolateCreateCallback create_callback = | 312 Dart_IsolateCreateCallback create_callback = |
311 ServiceIsolate::create_callback(); | 313 ServiceIsolate::create_callback(); |
312 // TODO(johnmccutchan): Support starting up service isolate without embedder | 314 // TODO(johnmccutchan): Support starting up service isolate without embedder |
313 // provided isolate creation callback. | 315 // provided isolate creation callback. |
314 if (create_callback == NULL) { | 316 if (create_callback == NULL) { |
315 ServiceIsolate::FinishedInitializing(); | 317 ServiceIsolate::FinishedInitializing(); |
316 return; | 318 return; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 ASSERT(!result.IsNull()); | 503 ASSERT(!result.IsNull()); |
502 Dart_Port port = ILLEGAL_PORT; | 504 Dart_Port port = ILLEGAL_PORT; |
503 if (result.IsReceivePort()) { | 505 if (result.IsReceivePort()) { |
504 port = ReceivePort::Cast(result).Id(); | 506 port = ReceivePort::Cast(result).Id(); |
505 } | 507 } |
506 ASSERT(port != ILLEGAL_PORT); | 508 ASSERT(port != ILLEGAL_PORT); |
507 ServiceIsolate::SetServicePort(port); | 509 ServiceIsolate::SetServicePort(port); |
508 } | 510 } |
509 | 511 |
510 } // namespace dart | 512 } // namespace dart |
OLD | NEW |