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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 1673423004: Fix the snapshotter to generate valid precompilation snapshots (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address CL feedback Created 4 years, 10 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 | « runtime/BUILD.gn ('k') | 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 d783c8572dc7ea8fdd5fdd79e3100334a8f9ac32..af2bdb70bfb3c062a8c4e07c9c6a80752e633448 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -435,7 +435,11 @@ static Dart_Handle LoadSnapshotCreationScript(const char* script_name) {
if (Dart_IsError(source)) {
return source;
}
- return Dart_LoadLibrary(resolved_script_uri, source, 0, 0);
+ if (IsSnapshottingForPrecompilation()) {
+ return Dart_LoadScript(resolved_script_uri, source, 0, 0);
+ } else {
+ return Dart_LoadLibrary(resolved_script_uri, source, 0, 0);
+ }
}
« no previous file with comments | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698