Chromium Code Reviews| Index: src/objects-visiting-inl.h |
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
| index 4f1498844dc496c4aed94996b0d509cccba1602e..9cd50c425ac9e3bc5849c92d6a1087e91f9030af 100644 |
| --- a/src/objects-visiting-inl.h |
| +++ b/src/objects-visiting-inl.h |
| @@ -501,6 +501,14 @@ void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( |
| StaticVisitor::VisitPointer(heap, |
|
ulan
2014/03/19 08:50:00
IIUC, each heap object pointer in constant pool is
|
| constant_pool->RawFieldOfElementAt(index)); |
| } |
| + for (int i = 0; i < constant_pool->count_of_weak_ptr_entries(); i++) { |
| + int index = constant_pool->first_weak_ptr_index() + i; |
| + Object** slot = constant_pool->RawFieldOfElementAt(index); |
| + HeapObject* object = HeapObject::cast(*slot); |
| + if (!object->IsCell()) { |
| + heap->mark_compact_collector()->RecordSlot(slot, slot, object); |
| + } |
| + } |
| } |