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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 1782493002: Do not start the service isolate when generating the core library snapshot as it does not load any … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 45087b4c502233d3ccac6f0c491e74078ce5a663..20cc410dc753d22662647a0d4dcc96451e79382a 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -1031,12 +1031,14 @@ int main(int argc, char** argv) {
// Initialize the Dart VM.
// Note: We don't expect isolates to be created from dart code during
- // snapshot generation.
+ // core library snapshot generation. However for the case when a full
+ // snasphot is generated from a script (app_script_name != NULL) we will
+ // need the service isolate to resolve URI and load code.
char* error = Dart_Initialize(
NULL,
NULL,
NULL,
- CreateServiceIsolate,
+ (app_script_name != NULL) ? CreateServiceIsolate : NULL,
NULL,
NULL,
NULL,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698