Index: src/heap/store-buffer.cc |
diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc |
index acfa70cf8ecafd8a0803d4c7fd38767fff565120..3df9f6e4fa1df020bb992653047b45c206e79308 100644 |
--- a/src/heap/store-buffer.cc |
+++ b/src/heap/store-buffer.cc |
@@ -63,6 +63,15 @@ void StoreBuffer::StoreBufferOverflow(Isolate* isolate) { |
isolate->counters()->store_buffer_overflows()->Increment(); |
} |
+void StoreBuffer::Remove(Address addr) { |
+ InsertEntriesFromBuffer(); |
+ MemoryChunk* chunk = MemoryChunk::FromAddress(addr); |
+ DCHECK_EQ(chunk->owner()->identity(), OLD_SPACE); |
+ uintptr_t offset = addr - chunk->address(); |
+ DCHECK_LT(offset, static_cast<uintptr_t>(Page::kPageSize)); |
+ if (chunk->old_to_new_slots() == nullptr) return; |
+ chunk->old_to_new_slots()->Remove(static_cast<uint32_t>(offset)); |
+} |
#ifdef VERIFY_HEAP |
void StoreBuffer::VerifyPointers(LargeObjectSpace* space) { |