Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index 09d754ff82164aa961f6dceba941a0db3460a996..35bad4af39ec94937720004f4e760332c2a0e36b 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -517,12 +517,8 @@ void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { |
AllocationMemento* memento = AllocationMemento::cast(candidate); |
if (!memento->IsValid()) return; |
- if (memento->GetAllocationSite()->IncrementMementoFoundCount() && |
- heap->allocation_sites_scratchpad_length < |
- kAllocationSiteScratchpadSize) { |
- heap->allocation_sites_scratchpad[ |
- heap->allocation_sites_scratchpad_length++] = |
- memento->GetAllocationSite(); |
+ if (memento->GetAllocationSite()->IncrementMementoFoundCount()) { |
+ heap->AddAllocationSiteToScratchpad(memento->GetAllocationSite()); |
} |
} |