Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index fd174e7432039033f00d670dd19daa6e8c7d6c88..104175ddacbd172724fc30bcb676be8375b2bd06 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -440,7 +440,7 @@ |
} |
CheckNewSpaceExpansionCriteria(); |
UpdateNewSpaceAllocationCounter(); |
- store_buffer()->MoveAllEntriesToRememberedSet(); |
+ store_buffer()->MoveEntriesToRememberedSet(); |
} |
@@ -5906,15 +5906,11 @@ |
void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { |
if (!InNewSpace(object)) { |
+ store_buffer()->MoveEntriesToRememberedSet(); |
Address slot_addr = reinterpret_cast<Address>(slot); |
Page* page = Page::FromAddress(slot_addr); |
DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
- if (gc_state_ == NOT_IN_GC) { |
- store_buffer()->DeleteEntry(slot_addr); |
- } else { |
- DCHECK(store_buffer()->Empty()); |
- RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); |
- } |
+ RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); |
RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); |
} |
} |
@@ -5922,14 +5918,10 @@ |
void Heap::ClearRecordedSlotRange(Address start, Address end) { |
Page* page = Page::FromAddress(start); |
if (!page->InNewSpace()) { |
+ store_buffer()->MoveEntriesToRememberedSet(); |
DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
- if (gc_state_ == NOT_IN_GC) { |
- store_buffer()->DeleteEntry(start, end); |
- } else { |
- DCHECK(store_buffer()->Empty()); |
- RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end, |
- SlotSet::PREFREE_EMPTY_BUCKETS); |
- } |
+ RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end, |
+ SlotSet::PREFREE_EMPTY_BUCKETS); |
RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end, |
SlotSet::FREE_EMPTY_BUCKETS); |
} |