Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 8f3e4c833a3be2ecaf86bddd97754a826d6d3f5a..ee9683712fabb0acad2e23952650b9704b50313a 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -759,7 +759,7 @@ TEST(JSArray) { |
JSArray::Initialize(array, 0); |
// Set array length to 0. |
- array->SetElementsLength(Smi::FromInt(0))->ToObjectChecked(); |
+ *JSArray::SetElementsLength(array, handle(Smi::FromInt(0), isolate)); |
CHECK_EQ(Smi::FromInt(0), array->length()); |
// Must be in fast mode. |
CHECK(array->HasFastSmiOrObjectElements()); |
@@ -772,7 +772,7 @@ TEST(JSArray) { |
// Set array length with larger than smi value. |
Handle<Object> length = |
factory->NewNumberFromUint(static_cast<uint32_t>(Smi::kMaxValue) + 1); |
- array->SetElementsLength(*length)->ToObjectChecked(); |
+ *JSArray::SetElementsLength(array, length); |
uint32_t int_length = 0; |
CHECK(length->ToArrayIndex(&int_length)); |