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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 Dart_IsolateCreateCallback create_callback = | 314 Dart_IsolateCreateCallback create_callback = |
315 ServiceIsolate::create_callback(); | 315 ServiceIsolate::create_callback(); |
316 // TODO(johnmccutchan): Support starting up service isolate without embedder | 316 // TODO(johnmccutchan): Support starting up service isolate without embedder |
317 // provided isolate creation callback. | 317 // provided isolate creation callback. |
318 if (create_callback == NULL) { | 318 if (create_callback == NULL) { |
319 ServiceIsolate::FinishedInitializing(); | 319 ServiceIsolate::FinishedInitializing(); |
320 return; | 320 return; |
321 } | 321 } |
322 | 322 |
323 Isolate::Flags default_flags; | |
324 Dart_IsolateFlags api_flags; | 323 Dart_IsolateFlags api_flags; |
325 default_flags.CopyTo(&api_flags); | 324 Isolate::FlagsInitialize(&api_flags); |
326 | 325 |
327 isolate = | 326 isolate = |
328 reinterpret_cast<Isolate*>(create_callback(ServiceIsolate::kName, | 327 reinterpret_cast<Isolate*>(create_callback(ServiceIsolate::kName, |
329 NULL, | 328 NULL, |
330 NULL, | 329 NULL, |
331 NULL, | 330 NULL, |
332 &api_flags, | 331 &api_flags, |
333 NULL, | 332 NULL, |
334 &error)); | 333 &error)); |
335 if (isolate == NULL) { | 334 if (isolate == NULL) { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 ASSERT(!result.IsNull()); | 504 ASSERT(!result.IsNull()); |
506 Dart_Port port = ILLEGAL_PORT; | 505 Dart_Port port = ILLEGAL_PORT; |
507 if (result.IsReceivePort()) { | 506 if (result.IsReceivePort()) { |
508 port = ReceivePort::Cast(result).Id(); | 507 port = ReceivePort::Cast(result).Id(); |
509 } | 508 } |
510 ASSERT(port != ILLEGAL_PORT); | 509 ASSERT(port != ILLEGAL_PORT); |
511 ServiceIsolate::SetServicePort(port); | 510 ServiceIsolate::SetServicePort(port); |
512 } | 511 } |
513 | 512 |
514 } // namespace dart | 513 } // namespace dart |
OLD | NEW |