| Index: vm/object_store.cc
|
| ===================================================================
|
| --- vm/object_store.cc (revision 4911)
|
| +++ vm/object_store.cc (working copy)
|
| @@ -54,8 +54,7 @@
|
| empty_context_(Context::null()),
|
| stack_overflow_(Instance::null()),
|
| out_of_memory_(Instance::null()),
|
| - keyword_symbols_(Array::null()),
|
| - preallocate_objects_called_(false) {
|
| + keyword_symbols_(Array::null()) {
|
| }
|
|
|
|
|
| @@ -77,11 +76,14 @@
|
|
|
|
|
| bool ObjectStore::PreallocateObjects() {
|
| - if (preallocate_objects_called_) {
|
| + Isolate* isolate = Isolate::Current();
|
| + ASSERT(isolate != NULL && isolate->object_store() == this);
|
| + if (this->stack_overflow() != Instance::null() &&
|
| + this->out_of_memory() != Instance::null()) {
|
| return true;
|
| }
|
| - Isolate* isolate = Isolate::Current();
|
| - ASSERT(isolate != NULL && isolate->object_store() == this);
|
| + ASSERT(this->stack_overflow() == Instance::null());
|
| + ASSERT(this->out_of_memory() == Instance::null());
|
| GrowableArray<const Object*> args;
|
| Object& result = Object::Handle();
|
| Instance& exception = Instance::Handle();
|
| @@ -99,8 +101,6 @@
|
| }
|
| exception ^= result.raw();
|
| set_out_of_memory(exception);
|
| -
|
| - preallocate_objects_called_ = true;
|
| return true;
|
| }
|
|
|
|
|