Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index 3dce348727477c260c894f3710956e4fe0e2ce8f..43fac441ae55b64e537fc9d5a752d7e3b307699a 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -484,7 +484,9 @@ void Heap::ScavengePointer(HeapObject** p) { |
void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { |
+ Heap* heap = object->GetIsolate()->heap(); |
if (FLAG_allocation_site_pretenuring && |
+ heap->new_space_high_promotion_mode_active_ && |
AllocationSite::CanTrack(object->map()->instance_type())) { |
AllocationMemento* memento = AllocationMemento::FindForHeapObject( |
mvstanton
2014/01/09 15:33:30
nit: you could pass the heap into FindForHeapObjec
Hannes Payer (out of office)
2014/01/09 16:01:09
Done.
|
object, true); |
@@ -492,7 +494,6 @@ void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { |
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[ |