| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index 702a8a2f50ded29165b6549fbe47f8a8cb7bc8d0..7e111637a5f7012443046587ffd61bdee81670b7 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -751,22 +751,24 @@ 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);
|
|
|
| - result = DartUtils::SetupIOLibrary(script_uri);
|
| - CHECK_RESULT(result);
|
| + result = DartUtils::SetupIOLibrary(script_uri);
|
| + CHECK_RESULT(result);
|
| + }
|
|
|
| // Make the isolate runnable so that it is ready to handle messages.
|
| Dart_ExitScope();
|
|
|