| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index c7e4d8f29a6cd9c60f1882bb945f0be518a6f256..ae095782c380c1c5cb0109dba436e9374260be82 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -2991,6 +2991,11 @@ bool MarkCompactCollector::IsSlotInBlackObject(MemoryChunk* p, Address slot) {
|
| base_address += (cell_index - base_address_cell_index) *
|
| Bitmap::kBitsPerCell * kPointerSize;
|
| Address address = base_address + offset * kPointerSize;
|
| +
|
| + // If the found mark bit is part of a black area, the slot cannot be part
|
| + // of a live object since it is not marked.
|
| + if (p->IsBlackAreaEndMarker(address + kPointerSize)) return false;
|
| +
|
| HeapObject* object = HeapObject::FromAddress(address);
|
| CHECK(Marking::IsBlack(ObjectMarking::MarkBitFrom(object)));
|
| CHECK(object->address() < reinterpret_cast<Address>(slot));
|
| @@ -3372,6 +3377,9 @@ int MarkCompactCollector::Sweeper::RawSweep(
|
| // requires valid mark bits.
|
| ArrayBufferTracker::FreeDead(p);
|
|
|
| + // We also release the black area markers here.
|
| + p->ReleaseBlackAreaEndMarkerMap();
|
| +
|
| Address free_start = p->area_start();
|
| DCHECK(reinterpret_cast<intptr_t>(free_start) % (32 * kPointerSize) == 0);
|
|
|
| @@ -3915,6 +3923,7 @@ void MarkCompactCollector::StartSweepSpace(PagedSpace* space) {
|
| if (p->IsEvacuationCandidate()) {
|
| // Will be processed in EvacuateNewSpaceAndCandidates.
|
| DCHECK(evacuation_candidates_.length() > 0);
|
| + DCHECK(!p->HasBlackAreas());
|
| continue;
|
| }
|
|
|
|
|