Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: runtime/bin/main.cc

Issue 2475523002: Reload native extensions when starting from a snapshot. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 return NULL; 812 return NULL;
813 } 813 }
814 814
815 Dart_EnterScope(); 815 Dart_EnterScope();
816 816
817 if (isolate_snapshot_buffer != NULL) { 817 if (isolate_snapshot_buffer != NULL) {
818 // Setup the native resolver as the snapshot does not carry it. 818 // Setup the native resolver as the snapshot does not carry it.
819 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); 819 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary);
820 Builtin::SetNativeResolver(Builtin::kIOLibrary); 820 Builtin::SetNativeResolver(Builtin::kIOLibrary);
821 } 821 }
822 if (run_app_snapshot) {
823 Dart_Handle result = Loader::ReloadNativeExtensions();
824 CHECK_RESULT(result);
825 }
822 826
823 // Set up the library tag handler for this isolate. 827 // Set up the library tag handler for this isolate.
824 Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler); 828 Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler);
825 CHECK_RESULT(result); 829 CHECK_RESULT(result);
826 830
827 if (Dart_IsServiceIsolate(isolate)) { 831 if (Dart_IsServiceIsolate(isolate)) {
828 // If this is the service isolate, load embedder specific bits and return. 832 // If this is the service isolate, load embedder specific bits and return.
829 bool skip_library_load = run_app_snapshot; 833 bool skip_library_load = run_app_snapshot;
830 if (!VmService::Setup(vm_service_server_ip, 834 if (!VmService::Setup(vm_service_server_ip,
831 vm_service_server_port, 835 vm_service_server_port,
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 Platform::Exit(Process::GlobalExitCode()); 1978 Platform::Exit(Process::GlobalExitCode());
1975 } 1979 }
1976 1980
1977 } // namespace bin 1981 } // namespace bin
1978 } // namespace dart 1982 } // namespace dart
1979 1983
1980 int main(int argc, char** argv) { 1984 int main(int argc, char** argv) {
1981 dart::bin::main(argc, argv); 1985 dart::bin::main(argc, argv);
1982 UNREACHABLE(); 1986 UNREACHABLE();
1983 } 1987 }
OLDNEW
« no previous file with comments | « runtime/bin/loader.cc ('k') | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698