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

Unified Diff: runtime/vm/object_store.cc

Issue 1721053002: Change return value of ObjectStore::PreallocateObjects to return the error object or null instead o… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/vm/object_store.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index a3bfae94b39310bd6f4e735b2b8939f42a316f0f..a0feb38bb8eea238f547e4fc1fe72a674e12dda4 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -118,7 +118,7 @@ void ObjectStore::Init(Isolate* isolate) {
}
-bool ObjectStore::PreallocateObjects() {
+RawError* ObjectStore::PreallocateObjects() {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
Zone* zone = thread->zone();
@@ -126,7 +126,7 @@ bool ObjectStore::PreallocateObjects() {
if (this->stack_overflow() != Instance::null()) {
ASSERT(this->out_of_memory() != Instance::null());
ASSERT(this->preallocated_stack_trace() != Stacktrace::null());
- return true;
+ return Error::null();
}
ASSERT(this->stack_overflow() == Instance::null());
ASSERT(this->out_of_memory() == Instance::null());
@@ -147,7 +147,7 @@ bool ObjectStore::PreallocateObjects() {
Symbols::Dot(),
Object::empty_array());
if (result.IsError()) {
- return false;
+ return Error::Cast(result).raw();
}
set_stack_overflow(Instance::Cast(result));
@@ -156,7 +156,7 @@ bool ObjectStore::PreallocateObjects() {
Symbols::Dot(),
Object::empty_array());
if (result.IsError()) {
- return false;
+ return Error::Cast(result).raw();
}
set_out_of_memory(Instance::Cast(result));
@@ -178,7 +178,7 @@ bool ObjectStore::PreallocateObjects() {
stack_trace.set_expand_inlined(false);
set_preallocated_stack_trace(stack_trace);
- return true;
+ return Error::null();
}
« no previous file with comments | « runtime/vm/object_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698