Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index b42720f178b797279c77615fdac02523aa9453eb..ba94930faae6820e4e3431b3ed7e8468b68491b8 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -5891,6 +5891,18 @@ void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { |
} |
} |
+bool Heap::HasRecordedSlot(HeapObject* object, Object** slot) { |
+ if (InNewSpace(object)) { |
+ return false; |
+ } |
+ Address slot_addr = reinterpret_cast<Address>(slot); |
+ Page* page = Page::FromAddress(slot_addr); |
+ DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
+ store_buffer()->MoveAllEntriesToRememberedSet(); |
+ return RememberedSet<OLD_TO_NEW>::Contains(page, slot_addr) || |
+ RememberedSet<OLD_TO_OLD>::Contains(page, slot_addr); |
+} |
+ |
void Heap::ClearRecordedSlotRange(Address start, Address end) { |
Page* page = Page::FromAddress(start); |
if (!page->InNewSpace()) { |