Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index 389af1bec1108e5040d27d90666fe48275976140..9734d5544b117b13bb054cc05cd645a0278fd62e 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -1581,13 +1581,12 @@ void PromotionQueue::RelocateQueueHead() { |
| emergency_stack_ = new List<Entry>(2 * entries_count); |
| while (head_start != head_end) { |
| - int size = static_cast<int>(*(head_start++)); |
| - HeapObject* obj = reinterpret_cast<HeapObject*>(*(head_start++)); |
| + struct Entry* entry = reinterpret_cast<struct Entry*>(head_start); |
|
ulan
2016/03/11 12:16:55
I think we need to increment head_start here.
Hannes Payer (out of office)
2016/03/11 12:23:19
Done.
|
| // New space allocation in SemiSpaceCopyObject marked the region |
| // overlapping with promotion queue as uninitialized. |
| - MSAN_MEMORY_IS_INITIALIZED(&size, sizeof(size)); |
| - MSAN_MEMORY_IS_INITIALIZED(&obj, sizeof(obj)); |
| - emergency_stack_->Add(Entry(obj, size)); |
| + MSAN_MEMORY_IS_INITIALIZED(&entry->size_, sizeof(size)); |
| + MSAN_MEMORY_IS_INITIALIZED(&entry->obj_, sizeof(obj)); |
| + emergency_stack_->Add(*entry); |
| } |
| rear_ = head_end; |
| } |
| @@ -1945,7 +1944,7 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor, |
| { |
| while (!promotion_queue()->is_empty()) { |
| HeapObject* target; |
| - int size; |
| + intptr_t size; |
| promotion_queue()->remove(&target, &size); |
| // Promoted object might be already partially visited |
| @@ -1954,7 +1953,8 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor, |
| // to new space. |
| DCHECK(!target->IsMap()); |
| - IteratePointersToFromSpace(target, size, &Scavenger::ScavengeObject); |
| + IteratePointersToFromSpace(target, static_cast<int>(size), |
| + &Scavenger::ScavengeObject); |
| } |
| } |