Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 878d36be33c78f71cab54a22904d20fdd2467499..3f60f60af20825f287524ff6bb38784ea1b5d3b9 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -2029,10 +2029,6 @@ |
HeapObject* filler2; |
if (double_misalignment) { |
start = AlignOldSpace(kDoubleAligned, 0); |
- // If we run out of linear allocation area then we might get null here. In |
- // that case we are unlucky and the test is not going to work, but it's not |
- // a test failure, this is a reasonable thing to happen. Just abandon. |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned); |
// The object is aligned, and a filler object is created after. |
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment)); |
@@ -2041,7 +2037,6 @@ |
filler1->Size() == kPointerSize); |
// Try the opposite alignment case. |
start = AlignOldSpace(kDoubleAligned, kPointerSize); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned); |
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment)); |
filler1 = HeapObject::FromAddress(start); |
@@ -2053,7 +2048,6 @@ |
// Similarly for kDoubleUnaligned. |
start = AlignOldSpace(kDoubleUnaligned, 0); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleUnaligned); |
// The object is aligned, and a filler object is created after. |
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment, kPointerSize)); |
@@ -2062,7 +2056,6 @@ |
filler1->Size() == kPointerSize); |
// Try the opposite alignment case. |
start = AlignOldSpace(kDoubleUnaligned, kPointerSize); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleUnaligned); |
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment, kPointerSize)); |
filler1 = HeapObject::FromAddress(start); |
@@ -2073,7 +2066,6 @@ |
// Now test SIMD alignment. There are 2 or 4 possible alignments, depending |
// on platform. |
start = AlignOldSpace(kSimd128Unaligned, 0); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned); |
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize)); |
// There is a filler object after the object. |
@@ -2081,7 +2073,6 @@ |
CHECK(obj != filler1 && filler1->IsFiller() && |
filler1->Size() == kSimd128Size - kPointerSize); |
start = AlignOldSpace(kSimd128Unaligned, kPointerSize); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned); |
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize)); |
// There is a filler object before the object. |
@@ -2092,7 +2083,6 @@ |
if (double_misalignment) { |
// Test the 2 other alignments possible on 32 bit platforms. |
start = AlignOldSpace(kSimd128Unaligned, 2 * kPointerSize); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned); |
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize)); |
// There are filler objects before and after the object. |
@@ -2103,7 +2093,6 @@ |
CHECK(obj != filler2 && filler2->IsFiller() && |
filler2->Size() == kPointerSize); |
start = AlignOldSpace(kSimd128Unaligned, 3 * kPointerSize); |
- if (start == NULL) return; |
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned); |
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize)); |
// There are filler objects before and after the object. |
@@ -5401,10 +5390,9 @@ |
Handle<JSObject> o = factory->NewJSObjectFromMap(map1, TENURED, false); |
o->set_properties(*factory->empty_fixed_array()); |
- // Ensure that the object allocated where we need it. If not, then abandon |
- // the test, since this isn't actually something we can reasonably require. |
+ // Ensure that the object allocated where we need it. |
Page* page = Page::FromAddress(o->address()); |
- if (desired_offset != page->Offset(o->address())) return; |
+ CHECK_EQ(desired_offset, page->Offset(o->address())); |
// Now we have an object right at the end of the page. |