| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index 6536e08d26540ffeb475b6a4e8127a3b38d596e7..75a5954b613f54faf30d1a2cd8d821f004ce3a7a 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -1364,28 +1364,31 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
|
| }
|
| Isolate* isolate = Dart::CreateIsolate(isolate_name, *flags);
|
| free(isolate_name);
|
| - StackZone zone(isolate);
|
| - HANDLESCOPE(isolate);
|
| - // We enter an API scope here as InitializeIsolate could compile some
|
| - // bootstrap library files which call out to a tag handler that may create
|
| - // Api Handles when an error is encountered.
|
| - Dart_EnterScope();
|
| - const Error& error_obj =
|
| - Error::Handle(isolate, Dart::InitializeIsolate(snapshot, callback_data));
|
| - if (error_obj.IsNull()) {
|
| -#if defined(DART_NO_SNAPSHOT)
|
| - if (FLAG_check_function_fingerprints) {
|
| - Library::CheckFunctionFingerprints();
|
| + {
|
| + StackZone zone(isolate);
|
| + HANDLESCOPE(isolate);
|
| + // We enter an API scope here as InitializeIsolate could compile some
|
| + // bootstrap library files which call out to a tag handler that may create
|
| + // Api Handles when an error is encountered.
|
| + Dart_EnterScope();
|
| + const Error& error_obj =
|
| + Error::Handle(isolate,
|
| + Dart::InitializeIsolate(snapshot, callback_data));
|
| + if (error_obj.IsNull()) {
|
| + #if defined(DART_NO_SNAPSHOT)
|
| + if (FLAG_check_function_fingerprints) {
|
| + Library::CheckFunctionFingerprints();
|
| + }
|
| + #endif // defined(DART_NO_SNAPSHOT).
|
| + // We exit the API scope entered above.
|
| + Dart_ExitScope();
|
| + START_TIMER(isolate, time_total_runtime);
|
| + return Api::CastIsolate(isolate);
|
| }
|
| -#endif // defined(DART_NO_SNAPSHOT).
|
| + *error = strdup(error_obj.ToErrorCString());
|
| // We exit the API scope entered above.
|
| Dart_ExitScope();
|
| - START_TIMER(isolate, time_total_runtime);
|
| - return Api::CastIsolate(isolate);
|
| }
|
| - *error = strdup(error_obj.ToErrorCString());
|
| - // We exit the API scope entered above.
|
| - Dart_ExitScope();
|
| Dart::ShutdownIsolate();
|
| return reinterpret_cast<Dart_Isolate>(NULL);
|
| }
|
|
|