Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Unified Diff: vm/object_store.cc

Issue 9580036: - Always write a Null Object for Code objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/object_store.h ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « vm/object_store.h ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698