Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index 3dce348727477c260c894f3710956e4fe0e2ce8f..5e6fb2b0ab1ca2ac6c21f759e64c3600ec482f32 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -484,15 +484,16 @@ void Heap::ScavengePointer(HeapObject** p) { |
void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { |
+ Heap* heap = object->GetHeap(); |
if (FLAG_allocation_site_pretenuring && |
+ heap->new_space_high_promotion_mode_active_ && |
AllocationSite::CanTrack(object->map()->instance_type())) { |
AllocationMemento* memento = AllocationMemento::FindForHeapObject( |
- object, true); |
+ object, heap, true); |
if (memento != NULL) { |
ASSERT(memento->IsValid()); |
bool add_to_scratchpad = |
memento->GetAllocationSite()->IncrementMementoFoundCount(); |
- Heap* heap = object->GetIsolate()->heap(); |
if (add_to_scratchpad && heap->allocation_sites_scratchpad_length < |
kAllocationSiteScratchpadSize) { |
heap->allocation_sites_scratchpad[ |