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

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

Issue 1553233002: Add package config support to dart:isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed review comments. Created 4 years, 11 months 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 Dart_ExitScope(); 948 Dart_ExitScope();
949 Dart_ShutdownIsolate(); 949 Dart_ShutdownIsolate();
950 exit(255); 950 exit(255);
951 } 951 }
952 } 952 }
953 953
954 954
955 static Dart_Isolate CreateServiceIsolate(const char* script_uri, 955 static Dart_Isolate CreateServiceIsolate(const char* script_uri,
956 const char* main, 956 const char* main,
957 const char* package_root, 957 const char* package_root,
958 const char** package_map, 958 const char* package_config,
959 Dart_IsolateFlags* flags, 959 Dart_IsolateFlags* flags,
960 void* data, 960 void* data,
961 char** error) { 961 char** error) {
962 Dart_Isolate isolate = NULL; 962 Dart_Isolate isolate = NULL;
963 isolate = Dart_CreateIsolate(script_uri, 963 isolate = Dart_CreateIsolate(script_uri,
964 main, 964 main,
965 NULL, 965 NULL,
966 NULL, 966 NULL,
967 NULL, 967 NULL,
968 error); 968 error);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 // Ensure that we mark all libraries as loaded. 1089 // Ensure that we mark all libraries as loaded.
1090 result = Dart_FinalizeLoading(false); 1090 result = Dart_FinalizeLoading(false);
1091 CHECK_RESULT(result); 1091 CHECK_RESULT(result);
1092 1092
1093 // Prepare for script loading by setting up the 'print' and 'timer' 1093 // Prepare for script loading by setting up the 'print' and 'timer'
1094 // closures and setting up 'package root' for URI resolution. 1094 // closures and setting up 'package root' for URI resolution.
1095 result = 1095 result =
1096 DartUtils::PrepareForScriptLoading(package_root, 1096 DartUtils::PrepareForScriptLoading(package_root,
1097 NULL, 1097 NULL,
1098 NULL,
1099 false, 1098 false,
1100 false, 1099 false,
1101 builtin_lib); 1100 builtin_lib);
1102 CHECK_RESULT(result); 1101 CHECK_RESULT(result);
1103 Dart_ExitScope(); 1102 Dart_ExitScope();
1104 Dart_ExitIsolate(); 1103 Dart_ExitIsolate();
1105 1104
1106 UriResolverIsolateScope::isolate = isolate; 1105 UriResolverIsolateScope::isolate = isolate;
1107 1106
1108 // Now we create an isolate into which we load all the code that needs to 1107 // Now we create an isolate into which we load all the code that needs to
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 EventHandler::Stop(); 1151 EventHandler::Stop();
1153 return 0; 1152 return 0;
1154 } 1153 }
1155 1154
1156 } // namespace bin 1155 } // namespace bin
1157 } // namespace dart 1156 } // namespace dart
1158 1157
1159 int main(int argc, char** argv) { 1158 int main(int argc, char** argv) {
1160 return dart::bin::main(argc, argv); 1159 return dart::bin::main(argc, argv);
1161 } 1160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698