| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index a430f8d1f5185e299cf76eb85f6ab822e6397667..c492c95c99b885d6733dcc6375614a26ccaf5819 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -848,6 +848,7 @@ static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate,
|
| if (dfe.kernel_file_specified()) {
|
| ASSERT(kernel_program != NULL);
|
| result = Dart_LoadKernel(kernel_program);
|
| + isolate_data->kernel_program = NULL; // Dart_LoadKernel takes ownership.
|
| } else {
|
| if (kernel_program != NULL) {
|
| Dart_Handle uri = Dart_NewStringFromCString(script_uri);
|
| @@ -857,6 +858,7 @@ static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate,
|
| result =
|
| Dart_LoadScript(uri, resolved_script_uri,
|
| reinterpret_cast<Dart_Handle>(kernel_program), 0, 0);
|
| + isolate_data->kernel_program = NULL; // Dart_LoadScript takes ownership.
|
| CHECK_RESULT(result);
|
| }
|
| }
|
| @@ -1047,6 +1049,7 @@ static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
|
| if (dfe.UsePlatformBinary()) {
|
| Dart_Handle library = Dart_LoadKernel(dfe.kernel_vmservice_io());
|
| CHECK_RESULT_CLEANUP(library, isolate_data);
|
| + dfe.unset_kernel_vmservice_io(); // Dart_LoadKernel takes ownership.
|
| skip_library_load = true;
|
| }
|
| #endif // !defined(DART_PRECOMPILED_RUNTIME)
|
|
|