Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index db28ac343fa7a1934d28c6898fb978dcec0c96d0..c7e98b7bab704c79eb6889437fe260644fdc9604 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -98,6 +98,14 @@ class VerifyMarkingVisitor: public ObjectVisitor { |
} |
} |
+ void VisitCell(RelocInfo* rinfo) { |
+ Code* code = rinfo->host(); |
+ ASSERT(rinfo->rmode() == RelocInfo::CELL); |
+ if (!Code::IsWeakEmbeddedObject(code->kind(), rinfo->target_cell())) { |
+ ObjectVisitor::VisitCell(rinfo); |
+ } |
+ } |
+ |
private: |
Heap* heap_; |
}; |
@@ -2551,6 +2559,16 @@ void MarkCompactCollector::ClearNonLiveReferences() { |
if (!table->IsKey(key)) continue; |
uint32_t value_index = table->EntryToValueIndex(i); |
Object* value = table->get(value_index); |
+ if (key->IsCell() && !IsMarked(key)) { |
+ Cell* cell = Cell::cast(key); |
+ Object* object = cell->value(); |
+ if (IsMarked(object)) { |
+ MarkBit mark = Marking::MarkBitFrom(cell); |
+ SetMark(cell, mark); |
+ Object** value_slot = HeapObject::RawField(cell, Cell::kValueOffset); |
+ RecordSlot(value_slot, value_slot, *value_slot); |
+ } |
+ } |
if (IsMarked(key)) { |
if (!IsMarked(value)) { |
HeapObject* obj = HeapObject::cast(value); |