| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index 6be11f0cc2cb8bf01044760242a257486fd10e48..42c804c8688c0e658280007a44f3fc172e9cfb08 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -407,12 +407,10 @@ static bool ProcessFullSnapshotAfterRunOption(
|
|
|
| static bool ProcessRunFullSnapshotOption(
|
| const char* filename, CommandLineOptions* vm_options) {
|
| - // Ensure that we are not running 'dart_no_snapshot'.
|
| - if (isolate_snapshot_buffer == NULL) {
|
| - Log::PrintErr("Full Application snapshots cannot be run with"
|
| - " dart_no_snapshot\n");
|
| - return false;
|
| - }
|
| +#ifndef DART_PRODUCT_BINARY
|
| + Log::PrintErr("Full Application snapshots can only be be run with"
|
| + " dart_product\n");
|
| +#endif
|
| return ProcessSnapshotOptionHelper(filename, &run_full_snapshot);
|
| }
|
|
|
| @@ -742,8 +740,15 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
|
| char** error,
|
| int* exit_code) {
|
| ASSERT(script_uri != NULL);
|
| +#if defined(DART_PRODUCT_BINARY)
|
| + if (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0) {
|
| + // No service isolate support.
|
| + return NULL;
|
| + }
|
| +#endif // defined(DART_PRODUCT_BINARY)
|
| +
|
| if (run_full_snapshot &&
|
| - !strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME)) {
|
| + (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0)) {
|
| // We do not create a service isolate when running a full application
|
| // snapshot.
|
| return NULL;
|
| @@ -777,6 +782,9 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
|
| Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler);
|
| CHECK_RESULT(result);
|
|
|
| +#if defined(DART_PRODUCT_BINARY)
|
| + ASSERT(!Dart_IsServiceIsolate(isolate));
|
| +#else
|
| if (Dart_IsServiceIsolate(isolate)) {
|
| // If this is the service isolate, load embedder specific bits and return.
|
| if (!VmService::Setup(vm_service_server_ip,
|
| @@ -793,6 +801,7 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
|
| Dart_ExitIsolate();
|
| return isolate;
|
| }
|
| +#endif // defined(DART_PRODUCT_BINARY)
|
|
|
| // Prepare builtin and other core libraries for use to resolve URIs.
|
| // Set up various closures, e.g: printing, timers etc.
|
| @@ -1268,6 +1277,7 @@ bool RunMainIsolate(const char* script_name,
|
| reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
|
| result = Dart_LibraryImportLibrary(
|
| isolate_data->builtin_lib(), root_lib, Dart_Null());
|
| +#ifndef DART_PRODUCT_BINARY
|
| if (is_noopt || gen_precompiled_snapshot) {
|
| // Load the embedder's portion of the VM service's Dart code so it will
|
| // be included in the precompiled snapshot.
|
| @@ -1279,6 +1289,7 @@ bool RunMainIsolate(const char* script_name,
|
| exit(kErrorExitCode);
|
| }
|
| }
|
| +#endif // !DART_PRODUCT_BINARY
|
|
|
| if (compile_all) {
|
| result = Dart_CompileAll();
|
|
|