| Index: test/cctest/test-spaces.cc
|
| diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
|
| index d6668d7ce131f946c0549f0801e63a17a7e9c78a..a84b867f8de0ef387ad15d7bbdc02a95decaed40 100644
|
| --- a/test/cctest/test-spaces.cc
|
| +++ b/test/cctest/test-spaces.cc
|
| @@ -459,6 +459,18 @@
|
| }
|
|
|
|
|
| +static inline void FillCurrentPage(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::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);
|
| +}
|
| +
|
| +
|
| UNINITIALIZED_TEST(NewSpaceGrowsToTargetCapacity) {
|
| FLAG_target_semi_space_size = 2;
|
| if (FLAG_optimize_for_size) return;
|
| @@ -490,9 +502,9 @@
|
|
|
| // Turn the allocation into a proper object so isolate teardown won't
|
| // crash.
|
| - HeapObject* free_space;
|
| - CHECK(allocation.To(&free_space));
|
| - new_space->heap()->CreateFillerObjectAt(free_space->address(), 80);
|
| + v8::internal::FreeListNode* node =
|
| + v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
|
| + node->set_size(new_space->heap(), 80);
|
| }
|
| }
|
| isolate->Dispose();
|
|
|