| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index 32aba56f98d0119c19a294d37684ebdf77d49951..1e1a7376eea1693f561e00c7e948bf0cbab5b3a7 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -2847,10 +2847,11 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst,
|
| SlotsBuffer::IGNORE_OVERFLOW);
|
| }
|
| } else if (compacting_ && dst->IsConstantPoolArray()) {
|
| - ConstantPoolArray* constant_pool = ConstantPoolArray::cast(dst);
|
| - for (int i = 0; i < constant_pool->count_of_code_ptr_entries(); i++) {
|
| + ConstantPoolArray* array = ConstantPoolArray::cast(dst);
|
| + ConstantPoolArray::Iterator code_iter(array, ConstantPoolArray::CODE_PTR);
|
| + while (!code_iter.is_finished()) {
|
| Address code_entry_slot =
|
| - dst_addr + constant_pool->OffsetOfElementAt(i);
|
| + dst_addr + array->OffsetOfElementAt(code_iter.next_index());
|
| Address code_entry = Memory::Address_at(code_entry_slot);
|
|
|
| if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {
|
|
|