Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| =================================================================== |
| --- runtime/vm/dart_api_impl.cc (revision 5192) |
| +++ runtime/vm/dart_api_impl.cc (working copy) |
| @@ -585,17 +585,19 @@ |
| char** error) { |
| Isolate* isolate = Dart::CreateIsolate(name_prefix); |
| assert(isolate != NULL); |
| - DARTSCOPE_NOCHECKS(isolate); |
| - const Error& error_obj = |
| - Error::Handle(Dart::InitializeIsolate(snapshot, callback_data)); |
| - if (error_obj.IsNull()) { |
| - START_TIMER(time_total_runtime); |
| - return reinterpret_cast<Dart_Isolate>(isolate); |
| - } else { |
| - *error = strdup(error_obj.ToErrorCString()); |
| - Dart::ShutdownIsolate(); |
| - return reinterpret_cast<Dart_Isolate>(NULL); |
| + { |
| + DARTSCOPE_NOCHECKS(isolate); |
| + const Error& error_obj = |
| + Error::Handle(Dart::InitializeIsolate(snapshot, callback_data)); |
| + if (error_obj.IsNull()) { |
| + START_TIMER(time_total_runtime); |
| + return reinterpret_cast<Dart_Isolate>(isolate); |
| + } else { |
|
siva
2012/03/12 20:09:39
We could even get rid of this else and
do:
}
*
|
| + *error = strdup(error_obj.ToErrorCString()); |
| + } |
| } |
| + Dart::ShutdownIsolate(); |
| + return reinterpret_cast<Dart_Isolate>(NULL); |
| } |