| Index: src/heap/remembered-set.cc
|
| diff --git a/src/heap/remembered-set.cc b/src/heap/remembered-set.cc
|
| index 3ceca5551d7eb883d273f65457861e618727891c..403c99b05712ec53d2920b40e5ee6ff9e3a2f84c 100644
|
| --- a/src/heap/remembered-set.cc
|
| +++ b/src/heap/remembered-set.cc
|
| @@ -22,9 +22,9 @@ void RememberedSet<direction>::ClearInvalidSlots(Heap* heap) {
|
| chunk = it.next();
|
| SlotSet* slots = GetSlotSet(chunk);
|
| if (slots != nullptr) {
|
| - slots->Iterate([heap](Address addr) {
|
| + slots->Iterate([heap, chunk](Address addr) {
|
| Object** slot = reinterpret_cast<Object**>(addr);
|
| - return IsValidSlot(heap, slot) ? KEEP_SLOT : REMOVE_SLOT;
|
| + return IsValidSlot(heap, chunk, slot) ? KEEP_SLOT : REMOVE_SLOT;
|
| });
|
| }
|
| }
|
| @@ -54,7 +54,8 @@ void RememberedSet<direction>::VerifyValidSlots(Heap* heap) {
|
| }
|
|
|
| template <PointerDirection direction>
|
| -bool RememberedSet<direction>::IsValidSlot(Heap* heap, Object** slot) {
|
| +bool RememberedSet<direction>::IsValidSlot(Heap* heap, MemoryChunk* chunk,
|
| + Object** slot) {
|
| STATIC_ASSERT(direction == OLD_TO_NEW);
|
| Object* object = *slot;
|
| if (!heap->InNewSpace(object)) {
|
| @@ -64,8 +65,8 @@ bool RememberedSet<direction>::IsValidSlot(Heap* heap, Object** slot) {
|
| // If the target object is not black, the source slot must be part
|
| // of a non-black (dead) object.
|
| return Marking::IsBlack(Marking::MarkBitFrom(heap_object)) &&
|
| - heap->mark_compact_collector()->IsSlotInLiveObject(
|
| - reinterpret_cast<Address>(slot));
|
| + heap->mark_compact_collector()->IsSlotInBlackObject(
|
| + chunk, reinterpret_cast<Address>(slot));
|
| }
|
|
|
| template void RememberedSet<OLD_TO_NEW>::ClearInvalidSlots(Heap* heap);
|
|
|