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

Unified Diff: test/cctest/cctest.h

Issue 259173003: Kiss goodbye to MaybeObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase + addressed comments Created 6 years, 8 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 | « src/v8globals.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index b85f462fc57bb73a020db3d63612139f6b791c39..36e1b96ebfce0ff2f1bfd5f12e5ae4f81eaf6dec 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -415,8 +415,10 @@ static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
int new_linear_size = static_cast<int>(
*space->allocation_limit_address() - *space->allocation_top_address());
if (new_linear_size == 0) return;
- v8::internal::MaybeObject* maybe = space->AllocateRaw(new_linear_size);
- v8::internal::FreeListNode* node = v8::internal::FreeListNode::cast(maybe);
+ v8::internal::AllocationResult allocation =
+ space->AllocateRaw(new_linear_size);
+ v8::internal::FreeListNode* node =
+ v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
node->set_size(space->heap(), new_linear_size);
}
« no previous file with comments | « src/v8globals.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698