Index: src/heap/scavenger-inl.h |
diff --git a/src/heap/scavenger-inl.h b/src/heap/scavenger-inl.h |
index 9edf0511768a960760940ebb4b026ba873d254c5..3b96f648f79a818121e2076d961687680aed2bf3 100644 |
--- a/src/heap/scavenger-inl.h |
+++ b/src/heap/scavenger-inl.h |
@@ -10,7 +10,8 @@ |
namespace v8 { |
namespace internal { |
-void Scavenger::ScavengeObject(HeapObject** p, HeapObject* object) { |
+void Scavenger::ScavengeObject(HeapObject** p, HeapObject* object, |
+ PromotionMode promotion_mode) { |
DCHECK(object->GetIsolate()->heap()->InFromSpace(object)); |
// We use the first word (where the map pointer usually is) of a heap |
@@ -34,18 +35,19 @@ void Scavenger::ScavengeObject(HeapObject** p, HeapObject* object) { |
// AllocationMementos are unrooted and shouldn't survive a scavenge |
DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); |
// Call the slow part of scavenge object. |
- return ScavengeObjectSlow(p, object); |
+ return ScavengeObjectSlow(p, object, promotion_mode); |
} |
-SlotCallbackResult Scavenger::CheckAndScavengeObject(Heap* heap, |
- Address slot_address) { |
+SlotCallbackResult Scavenger::CheckAndScavengeObject( |
+ Heap* heap, Address slot_address, PromotionMode promotion_mode) { |
Object** slot = reinterpret_cast<Object**>(slot_address); |
Object* object = *slot; |
if (heap->InFromSpace(object)) { |
HeapObject* heap_object = reinterpret_cast<HeapObject*>(object); |
DCHECK(heap_object->IsHeapObject()); |
- ScavengeObject(reinterpret_cast<HeapObject**>(slot), heap_object); |
+ ScavengeObject(reinterpret_cast<HeapObject**>(slot), heap_object, |
+ promotion_mode); |
object = *slot; |
// If the object was in from space before and is after executing the |
@@ -67,7 +69,8 @@ void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj, |
Object* object = *p; |
if (!heap->InNewSpace(object)) return; |
Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), |
- reinterpret_cast<HeapObject*>(object)); |
+ reinterpret_cast<HeapObject*>(object), |
+ DEFAULT_PROMOTION); |
} |
} // namespace internal |