Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 0a5b69f925acaf07d64269a9eb05fd4abab887b1..01cb925f4953d21bd68d90fefef568fefe96f0e0 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -9466,13 +9466,14 @@ bool Map::EquivalentToForNormalization(Map* other, |
| void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) { |
| - if (count_of_ptr_entries() > 0) { |
| - int first_ptr_offset = OffsetOfElementAt(first_ptr_index()); |
| - int last_ptr_offset = |
| - OffsetOfElementAt(first_ptr_index() + count_of_ptr_entries() - 1); |
| - v->VisitPointers( |
| - HeapObject::RawField(this, first_ptr_offset), |
| - HeapObject::RawField(this, last_ptr_offset)); |
| + for (int i = 0; i < count_of_code_ptr_entries(); i++) { |
| + int offset = OffsetOfElementAt(first_code_ptr_index() + i); |
|
Michael Starzinger
2014/03/10 15:00:38
nit: Can we use RawFieldOfElementAt he instead? Th
rmcilroy
2014/03/10 16:55:20
Done.
|
| + v->VisitCodeEntry( |
| + reinterpret_cast<Address>(HeapObject::RawField(this, offset))); |
| + } |
| + for (int i = 0; i < count_of_heap_ptr_entries(); i++) { |
| + int offset = OffsetOfElementAt(first_heap_ptr_index() + i); |
|
Michael Starzinger
2014/03/10 15:00:38
nit: Can we use RawFieldOfElementAt he instead? Th
rmcilroy
2014/03/10 16:55:20
Done.
|
| + v->VisitPointer(HeapObject::RawField(this, offset)); |
| } |
| } |