| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 | 5 |
| 6 #include "bin/loader.h" | 6 #include "bin/loader.h" |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/dartutils.h" | 9 #include "bin/dartutils.h" |
| 10 #include "bin/extensions.h" | 10 #include "bin/extensions.h" |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 543 } |
| 544 | 544 |
| 545 | 545 |
| 546 Dart_Handle Loader::SendAndProcessReply(intptr_t tag, | 546 Dart_Handle Loader::SendAndProcessReply(intptr_t tag, |
| 547 Dart_Handle url, | 547 Dart_Handle url, |
| 548 uint8_t** payload, | 548 uint8_t** payload, |
| 549 intptr_t* payload_length) { | 549 intptr_t* payload_length) { |
| 550 IsolateData* isolate_data = | 550 IsolateData* isolate_data = |
| 551 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); | 551 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
| 552 ASSERT(isolate_data != NULL); | 552 ASSERT(isolate_data != NULL); |
| 553 #ifndef TARGET_OS_FUCHSIA |
| 554 // TODO(29458): Enable on Fuchsia. |
| 553 ASSERT(!isolate_data->HasLoader()); | 555 ASSERT(!isolate_data->HasLoader()); |
| 556 #endif |
| 554 Loader* loader = NULL; | 557 Loader* loader = NULL; |
| 555 | 558 |
| 556 // Setup the loader. The constructor does a bunch of leg work. | 559 // Setup the loader. The constructor does a bunch of leg work. |
| 557 loader = new Loader(isolate_data); | 560 loader = new Loader(isolate_data); |
| 558 loader->Init(isolate_data->package_root, isolate_data->packages_file, | 561 loader->Init(isolate_data->package_root, isolate_data->packages_file, |
| 559 DartUtils::original_working_directory, NULL); | 562 DartUtils::original_working_directory, NULL); |
| 560 ASSERT(loader != NULL); | 563 ASSERT(loader != NULL); |
| 561 ASSERT(isolate_data->HasLoader()); | 564 ASSERT(isolate_data->HasLoader()); |
| 562 | 565 |
| 563 // Now send a load request to the service isolate. | 566 // Now send a load request to the service isolate. |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 MutexLocker ml(loader_infos_lock_); | 874 MutexLocker ml(loader_infos_lock_); |
| 872 Loader* loader = LoaderForLocked(dest_port_id); | 875 Loader* loader = LoaderForLocked(dest_port_id); |
| 873 if (loader == NULL) { | 876 if (loader == NULL) { |
| 874 return; | 877 return; |
| 875 } | 878 } |
| 876 loader->QueueMessage(message); | 879 loader->QueueMessage(message); |
| 877 } | 880 } |
| 878 | 881 |
| 879 } // namespace bin | 882 } // namespace bin |
| 880 } // namespace dart | 883 } // namespace dart |
| OLD | NEW |