Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index b1536cdf6237437753e2492464bafabb7fa7976f..11bdd33c198cefbd59115fe836e473ba3004a43c 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3171,6 +3171,7 @@ void Heap::AdjustLiveBytes(HeapObject* object, int by) { |
FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, |
int elements_to_trim) { |
CHECK_NOT_NULL(object); |
+ DCHECK(CanMoveObjectStart(object)); |
DCHECK(!object->IsFixedTypedArrayBase()); |
DCHECK(!object->IsByteArray()); |
const int element_size = object->IsFixedArray() ? kPointerSize : kDoubleSize; |
@@ -3221,7 +3222,6 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, |
// Initialize header of the trimmed array. Since left trimming is only |
// performed on pages which are not concurrently swept creating a filler |
// object does not require synchronization. |
- DCHECK(CanMoveObjectStart(object)); |
Object** former_start = HeapObject::RawField(object, 0); |
int new_start_index = elements_to_trim * (element_size / kPointerSize); |
former_start[new_start_index] = map; |
@@ -4287,7 +4287,7 @@ void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) { |
Address addr = chunk.start; |
while (addr < chunk.end) { |
HeapObject* obj = HeapObject::FromAddress(addr); |
- Marking::MarkBlack(ObjectMarking::MarkBitFrom(obj)); |
+ ObjectMarking::WhiteToBlack(obj); |
addr += obj->Size(); |
} |
} |