Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 5ce04b9d0cc814da6cc6dfdc70308fbe3578262e..762354e184586b41377857b7a16ce2e2efa4555d 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -378,12 +378,14 @@ void FixedDoubleArray::FixedDoubleArrayVerify() { |
void ConstantPoolArray::ConstantPoolArrayVerify() { |
CHECK(IsConstantPoolArray()); |
- for (int i = 0; i < count_of_code_ptr_entries(); i++) { |
- Address code_entry = get_code_ptr_entry(first_code_ptr_index() + i); |
+ ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR); |
+ while (!code_iter.is_finished()) { |
+ Address code_entry = get_code_ptr_entry(code_iter.next_index()); |
VerifyPointer(Code::GetCodeFromTargetAddress(code_entry)); |
} |
- for (int i = 0; i < count_of_heap_ptr_entries(); i++) { |
- VerifyObjectField(OffsetOfElementAt(first_heap_ptr_index() + i)); |
+ ConstantPoolArray::Iterator heap_iter(this, ConstantPoolArray::HEAP_PTR); |
+ while (!heap_iter.is_finished()) { |
+ VerifyObjectField(OffsetOfElementAt(heap_iter.next_index())); |
} |
} |