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

Unified Diff: runtime/bin/main.cc

Issue 1336763002: Last snapshot bits to get working precompiled hello_world on x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 3 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 | runtime/vm/dart.cc » ('j') | runtime/vm/dart.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index ee7b80d8efaee4622b4aa7b54bc4f5d73f5c93b6..b3cb669558c0eaabc550ed3afbadf1397792c494 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -714,21 +714,23 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
result = Dart_SetEnvironmentCallback(EnvironmentCallback);
CHECK_RESULT(result);
- // Load the script.
- result = DartUtils::LoadScript(script_uri, builtin_lib);
- CHECK_RESULT(result);
+ if (!has_run_precompiled_snapshot) {
+ // Load the script.
+ result = DartUtils::LoadScript(script_uri, builtin_lib);
+ CHECK_RESULT(result);
- // Run event-loop and wait for script loading to complete.
- result = Dart_RunLoop();
- CHECK_RESULT(result);
+ // Run event-loop and wait for script loading to complete.
+ result = Dart_RunLoop();
+ CHECK_RESULT(result);
- if (isolate_data->load_async_id >= 0) {
- Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
- }
+ if (isolate_data->load_async_id >= 0) {
+ Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
+ }
- Platform::SetPackageRoot(package_root);
+ Platform::SetPackageRoot(package_root);
- DartUtils::SetupIOLibrary(script_uri);
+ DartUtils::SetupIOLibrary(script_uri);
+ }
// Make the isolate runnable so that it is ready to handle messages.
Dart_ExitScope();
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698