summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/heap/test-page-promotion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/heap/test-page-promotion.cc')
-rw-r--r--deps/v8/test/cctest/heap/test-page-promotion.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/deps/v8/test/cctest/heap/test-page-promotion.cc b/deps/v8/test/cctest/heap/test-page-promotion.cc
index df6211826e..c31fc39c2e 100644
--- a/deps/v8/test/cctest/heap/test-page-promotion.cc
+++ b/deps/v8/test/cctest/heap/test-page-promotion.cc
@@ -43,8 +43,7 @@ v8::Isolate* NewIsolateForPagePromotion(int min_semi_space_size = 8,
return isolate;
}
-Page* FindLastPageInNewSpace(
- std::vector<Handle<FixedArray>>& handles) { // NOLINT(runtime/references)
+Page* FindLastPageInNewSpace(const std::vector<Handle<FixedArray>>& handles) {
for (auto rit = handles.rbegin(); rit != handles.rend(); ++rit) {
// One deref gets the Handle, the second deref gets the FixedArray.
Page* candidate = Page::FromHeapObject(**rit);
@@ -146,8 +145,10 @@ UNINITIALIZED_TEST(PagePromotion_NewToNewJSArrayBuffer) {
heap::FillCurrentPage(heap->new_space());
// Allocate a buffer we would like to check against.
Handle<JSArrayBuffer> buffer =
- i_isolate->factory()->NewJSArrayBuffer(SharedFlag::kNotShared);
- CHECK(JSArrayBuffer::SetupAllocatingData(buffer, i_isolate, 100));
+ i_isolate->factory()
+ ->NewJSArrayBufferAndBackingStore(100,
+ InitializedFlag::kZeroInitialized)
+ .ToHandleChecked();
std::vector<Handle<FixedArray>> handles;
// Simulate a full space, filling the interesting page with live objects.
heap::SimulateFullSpace(heap->new_space(), &handles);
@@ -188,8 +189,10 @@ UNINITIALIZED_TEST(PagePromotion_NewToOldJSArrayBuffer) {
heap::FillCurrentPage(heap->new_space());
// Allocate a buffer we would like to check against.
Handle<JSArrayBuffer> buffer =
- i_isolate->factory()->NewJSArrayBuffer(SharedFlag::kNotShared);
- CHECK(JSArrayBuffer::SetupAllocatingData(buffer, i_isolate, 100));
+ i_isolate->factory()
+ ->NewJSArrayBufferAndBackingStore(100,
+ InitializedFlag::kZeroInitialized)
+ .ToHandleChecked();
std::vector<Handle<FixedArray>> handles;
// Simulate a full space, filling the interesting page with live objects.
heap::SimulateFullSpace(heap->new_space(), &handles);