| Index: vm/dart_api_impl.cc
|
| ===================================================================
|
| --- vm/dart_api_impl.cc (revision 4911)
|
| +++ vm/dart_api_impl.cc (working copy)
|
| @@ -62,22 +62,20 @@
|
| ClassFinalizer::FinalizePendingClassesForSnapshotCreation() :
|
| ClassFinalizer::FinalizePendingClasses();
|
| }
|
| - if (success && !generating_snapshot) {
|
| + if (success) {
|
| success = isolate->object_store()->PreallocateObjects();
|
| + if (success) {
|
| + return NULL;
|
| + }
|
| }
|
| - if (success) {
|
| - return NULL;
|
| - } else {
|
| - // Make a copy of the error message as the original message string
|
| - // may get deallocated when we return back from the Dart API call.
|
| - const Error& err =
|
| - Error::Handle(isolate->object_store()->sticky_error());
|
| - const char* errmsg = err.ToErrorCString();
|
| - intptr_t errlen = strlen(errmsg) + 1;
|
| - char* msg = reinterpret_cast<char*>(Api::Allocate(errlen));
|
| - OS::SNPrint(msg, errlen, "%s", errmsg);
|
| - return msg;
|
| - }
|
| + // Make a copy of the error message as the original message string
|
| + // may get deallocated when we return back from the Dart API call.
|
| + const Error& err = Error::Handle(isolate->object_store()->sticky_error());
|
| + const char* errmsg = err.ToErrorCString();
|
| + intptr_t errlen = strlen(errmsg) + 1;
|
| + char* msg = reinterpret_cast<char*>(Api::Allocate(errlen));
|
| + OS::SNPrint(msg, errlen, "%s", errmsg);
|
| + return msg;
|
| }
|
|
|
|
|
|
|