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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 2948273002: Correctly set root_library based on the application script URI instead of looking for the library t… (Closed)
Patch Set: Integrate cl from Siggi for front end change to not require a 'main' method when using the memory f… Created 3 years, 5 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/bin/dfe.cc ('k') | runtime/bin/loader.cc » ('j') | 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 2a7d3247eb75c0dd30fa5ecc24c838c3182481a1..d63328a65c83235a2341af07e203733898738de0 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -1749,8 +1749,12 @@ int main(int argc, char** argv) {
ParseEntryPointsManifestIfPresent();
if (kernel_program != NULL) {
- Dart_Handle library = Dart_LoadKernel(kernel_program);
- if (Dart_IsError(library)) FATAL("Failed to load app from Kernel IR");
+ Dart_Handle resolved_uri = ResolveUriInWorkingDirectory(app_script_name);
+ CHECK_RESULT(resolved_uri);
+ Dart_Handle library =
+ Dart_LoadScript(resolved_uri, Dart_Null(),
+ reinterpret_cast<Dart_Handle>(kernel_program), 0, 0);
+ CHECK_RESULT(library);
} else {
// Set up the library tag handler in such a manner that it will use the
// URL mapping specified on the command line to load the libraries.
« no previous file with comments | « runtime/bin/dfe.cc ('k') | runtime/bin/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698