| Index: src/objects-visiting-inl.h
|
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
|
| index d7bc6e242b598b7cc9fec0bca1f5bcbe4cb9374e..b9513420105e32ac310d119d077d0b0c9eeaa11e 100644
|
| --- a/src/objects-visiting-inl.h
|
| +++ b/src/objects-visiting-inl.h
|
| @@ -261,6 +261,9 @@ void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer(
|
| ASSERT(!rinfo->target_object()->IsConsString());
|
| HeapObject* object = HeapObject::cast(rinfo->target_object());
|
| heap->mark_compact_collector()->RecordRelocSlot(rinfo, object);
|
| + // TODO(ulan): It could be better to record slots only for strongly embedded
|
| + // objects here and record slots for weakly embedded object during clearing
|
| + // of non-live references in mark-compact.
|
| if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), object)) {
|
| StaticVisitor::MarkObject(heap, object);
|
| }
|
| @@ -272,7 +275,10 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCell(
|
| Heap* heap, RelocInfo* rinfo) {
|
| ASSERT(rinfo->rmode() == RelocInfo::CELL);
|
| Cell* cell = rinfo->target_cell();
|
| - StaticVisitor::MarkObject(heap, cell);
|
| + // No need to record slots because the cell space is not compacted during GC.
|
| + if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), cell)) {
|
| + StaticVisitor::MarkObject(heap, cell);
|
| + }
|
| }
|
|
|
|
|
|
|