| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 // Setup a loader. The constructor does a bunch of leg work. | 442 // Setup a loader. The constructor does a bunch of leg work. |
| 443 Loader* loader = new Loader(isolate_data); | 443 Loader* loader = new Loader(isolate_data); |
| 444 // Send the init message. | 444 // Send the init message. |
| 445 loader->Init(isolate_data->package_root, isolate_data->packages_file, | 445 loader->Init(isolate_data->package_root, isolate_data->packages_file, |
| 446 DartUtils::original_working_directory, snapshot_uri); | 446 DartUtils::original_working_directory, snapshot_uri); |
| 447 // Destroy the loader. The destructor does a bunch of leg work. | 447 // Destroy the loader. The destructor does a bunch of leg work. |
| 448 delete loader; | 448 delete loader; |
| 449 } | 449 } |
| 450 | 450 |
| 451 | 451 |
| 452 #define RETURN_ERROR(result) \ | 452 #define RETURN_ERROR(result) \ |
| 453 if (Dart_IsError(result)) return result; | 453 if (Dart_IsError(result)) return result; |
| 454 | 454 |
| 455 Dart_Handle Loader::ReloadNativeExtensions() { | 455 Dart_Handle Loader::ReloadNativeExtensions() { |
| 456 Dart_Handle scheme = | 456 Dart_Handle scheme = |
| 457 Dart_NewStringFromCString(DartUtils::kDartExtensionScheme); | 457 Dart_NewStringFromCString(DartUtils::kDartExtensionScheme); |
| 458 Dart_Handle extension_imports = Dart_GetImportsOfScheme(scheme); | 458 Dart_Handle extension_imports = Dart_GetImportsOfScheme(scheme); |
| 459 RETURN_ERROR(extension_imports); | 459 RETURN_ERROR(extension_imports); |
| 460 | 460 |
| 461 intptr_t length = -1; | 461 intptr_t length = -1; |
| 462 Dart_Handle result = Dart_ListLength(extension_imports, &length); | 462 Dart_Handle result = Dart_ListLength(extension_imports, &length); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 MutexLocker ml(loader_infos_lock_); | 795 MutexLocker ml(loader_infos_lock_); |
| 796 Loader* loader = LoaderForLocked(dest_port_id); | 796 Loader* loader = LoaderForLocked(dest_port_id); |
| 797 if (loader == NULL) { | 797 if (loader == NULL) { |
| 798 return; | 798 return; |
| 799 } | 799 } |
| 800 loader->QueueMessage(message); | 800 loader->QueueMessage(message); |
| 801 } | 801 } |
| 802 | 802 |
| 803 } // namespace bin | 803 } // namespace bin |
| 804 } // namespace dart | 804 } // namespace dart |
| OLD | NEW |