Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index c0e1039e3c91018eb1a8cb63d531840d7bd6aad7..755db4373197b1ad2de2c3a162c6c375c22bb733 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_; |
}; |
@@ -2564,6 +2572,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); |