| 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 | 590 |
| 591 Dart_IsolateCreateCallback create_callback = | 591 Dart_IsolateCreateCallback create_callback = |
| 592 ServiceIsolate::create_callback(); | 592 ServiceIsolate::create_callback(); |
| 593 // TODO(johnmccutchan): Support starting up service isolate without embedder | 593 // TODO(johnmccutchan): Support starting up service isolate without embedder |
| 594 // provided isolate creation callback. | 594 // provided isolate creation callback. |
| 595 if (create_callback == NULL) { | 595 if (create_callback == NULL) { |
| 596 ServiceIsolate::FinishedInitializing(); | 596 ServiceIsolate::FinishedInitializing(); |
| 597 return; | 597 return; |
| 598 } | 598 } |
| 599 | 599 |
| 600 isolate = | 600 isolate = Api::CastIsolate(create_callback(ServiceIsolate::kName, |
| 601 reinterpret_cast<Isolate*>(create_callback(ServiceIsolate::kName, | 601 NULL, |
| 602 NULL, | 602 NULL, |
| 603 NULL, | 603 NULL, |
| 604 NULL, | 604 &error)); |
| 605 &error)); | |
| 606 if (isolate == NULL) { | 605 if (isolate == NULL) { |
| 607 OS::PrintErr("vm-service: Isolate creation error: %s\n", error); | 606 OS::PrintErr("vm-service: Isolate creation error: %s\n", error); |
| 608 ServiceIsolate::FinishedInitializing(); | 607 ServiceIsolate::FinishedInitializing(); |
| 609 return; | 608 return; |
| 610 } | 609 } |
| 611 | 610 |
| 612 Thread::ExitIsolate(); | 611 Thread::ExitIsolate(); |
| 613 | 612 |
| 614 ServiceIsolate::ConstructExitMessageAndCache(isolate); | 613 ServiceIsolate::ConstructExitMessageAndCache(isolate); |
| 615 | 614 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 return result; | 770 return result; |
| 772 } | 771 } |
| 773 Dart_Handle source = GetSource(url_string); | 772 Dart_Handle source = GetSource(url_string); |
| 774 if (Dart_IsError(source)) { | 773 if (Dart_IsError(source)) { |
| 775 return source; | 774 return source; |
| 776 } | 775 } |
| 777 return Dart_LoadSource(library, url, source, 0, 0); | 776 return Dart_LoadSource(library, url, source, 0, 0); |
| 778 } | 777 } |
| 779 | 778 |
| 780 } // namespace dart | 779 } // namespace dart |
| OLD | NEW |