Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8178a1ab4854217aa3986576f3d4b47c4c8eb2bb..05d0910f6b249660686a0fa05765b493fd3304c9 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1146,7 +1146,7 @@ bool Heap::ReserveSpace(Reservation* reservations, List<Address>* maps) { |
// deserializing. |
Address free_space_address = free_space->address(); |
CreateFillerObjectAt(free_space_address, Map::kSize, |
- ClearRecordedSlots::kNo); |
+ ClearRecordedSlots::kNo, ClearBlackArea::kNo); |
maps->Add(free_space_address); |
} else { |
perform_gc = true; |
@@ -1176,7 +1176,7 @@ bool Heap::ReserveSpace(Reservation* reservations, List<Address>* maps) { |
// deserializing. |
Address free_space_address = free_space->address(); |
CreateFillerObjectAt(free_space_address, size, |
- ClearRecordedSlots::kNo); |
+ ClearRecordedSlots::kNo, ClearBlackArea::kNo); |
DCHECK(space < SerializerDeserializer::kNumberOfPreallocatedSpaces); |
chunk.start = free_space_address; |
chunk.end = free_space_address + size; |
@@ -3065,8 +3065,8 @@ AllocationResult Heap::AllocateBytecodeArray(int length, |
return result; |
} |
-void Heap::CreateFillerObjectAt(Address addr, int size, |
- ClearRecordedSlots mode) { |
+void Heap::CreateFillerObjectAt(Address addr, int size, ClearRecordedSlots mode, |
+ ClearBlackArea black_area_mode) { |
if (size == 0) return; |
HeapObject* filler = HeapObject::FromAddress(addr); |
if (size == kPointerSize) { |
@@ -3087,7 +3087,8 @@ void Heap::CreateFillerObjectAt(Address addr, int size, |
// If the location where the filler is created is within a black area we have |
// to clear the mark bits of the filler space. |
- if (incremental_marking()->black_allocation() && |
+ if (black_area_mode == ClearBlackArea::kYes && |
+ incremental_marking()->black_allocation() && |
Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(addr))) { |
Page* page = Page::FromAddress(addr); |
page->markbits()->ClearRange(page->AddressToMarkbitIndex(addr), |