| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index 6b3b3db8d47f93e180d091fe51a17dc27b918e91..8d9ec0cdefaa5b8357c1210a218e5333c1b4d791 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -2883,10 +2883,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()) {
|
|
|