| 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();
|
|
|