OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 return NULL; | 808 return NULL; |
809 } | 809 } |
810 | 810 |
811 Dart_EnterScope(); | 811 Dart_EnterScope(); |
812 | 812 |
813 if (isolate_snapshot_buffer != NULL) { | 813 if (isolate_snapshot_buffer != NULL) { |
814 // Setup the native resolver as the snapshot does not carry it. | 814 // Setup the native resolver as the snapshot does not carry it. |
815 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); | 815 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); |
816 Builtin::SetNativeResolver(Builtin::kIOLibrary); | 816 Builtin::SetNativeResolver(Builtin::kIOLibrary); |
817 } | 817 } |
| 818 if (run_app_snapshot) { |
| 819 Dart_Handle result = Loader::ReloadNativeExtensions(); |
| 820 CHECK_RESULT(result); |
| 821 } |
818 | 822 |
819 // Set up the library tag handler for this isolate. | 823 // Set up the library tag handler for this isolate. |
820 Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler); | 824 Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler); |
821 CHECK_RESULT(result); | 825 CHECK_RESULT(result); |
822 | 826 |
823 if (Dart_IsServiceIsolate(isolate)) { | 827 if (Dart_IsServiceIsolate(isolate)) { |
824 // If this is the service isolate, load embedder specific bits and return. | 828 // If this is the service isolate, load embedder specific bits and return. |
825 bool skip_library_load = run_app_snapshot; | 829 bool skip_library_load = run_app_snapshot; |
826 if (!VmService::Setup(vm_service_server_ip, vm_service_server_port, | 830 if (!VmService::Setup(vm_service_server_ip, vm_service_server_port, |
827 skip_library_load, vm_service_dev_mode)) { | 831 skip_library_load, vm_service_dev_mode)) { |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1914 Platform::Exit(Process::GlobalExitCode()); | 1918 Platform::Exit(Process::GlobalExitCode()); |
1915 } | 1919 } |
1916 | 1920 |
1917 } // namespace bin | 1921 } // namespace bin |
1918 } // namespace dart | 1922 } // namespace dart |
1919 | 1923 |
1920 int main(int argc, char** argv) { | 1924 int main(int argc, char** argv) { |
1921 dart::bin::main(argc, argv); | 1925 dart::bin::main(argc, argv); |
1922 UNREACHABLE(); | 1926 UNREACHABLE(); |
1923 } | 1927 } |
OLD | NEW |