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); |
} |