Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index b4f488bd9570e98191da12d61dc9ee25b3dfa084..fb5a7e7caef741e1c2fd1bd51c4a95662ba32417 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -337,6 +337,7 @@ void MarkCompactCollector::VerifyMarkbitsAreClean() { |
for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { |
MarkBit mark_bit = Marking::MarkBitFrom(obj); |
ASSERT(Marking::IsWhite(mark_bit)); |
+ ASSERT_EQ(0, Page::FromAddress(obj->address())->LiveBytes()); |
} |
} |
#endif |
@@ -373,6 +374,7 @@ void MarkCompactCollector::ClearMarkbits() { |
MarkBit mark_bit = Marking::MarkBitFrom(obj); |
mark_bit.Clear(); |
mark_bit.Next().Clear(); |
+ Page::FromAddress(obj->address())->ResetLiveBytes(); |
} |
} |
@@ -2592,12 +2594,10 @@ void MarkCompactCollector::ProcessWeakMaps() { |
ObjectHashTable* table = ObjectHashTable::cast(weak_map->table()); |
for (int i = 0; i < table->Capacity(); i++) { |
if (MarkCompactCollector::IsMarked(HeapObject::cast(table->KeyAt(i)))) { |
- Object* value = table->get(table->EntryToValueIndex(i)); |
- StaticMarkingVisitor::VisitPointer(heap(), &value); |
- table->set_unchecked(heap(), |
- table->EntryToValueIndex(i), |
- value, |
- UPDATE_WRITE_BARRIER); |
+ int idx = ObjectHashTable::EntryToValueIndex(i); |
+ Object** slot = |
+ HeapObject::RawField(table, FixedArray::OffsetOfElementAt(idx)); |
+ StaticMarkingVisitor::VisitPointer(heap(), slot); |
} |
} |
weak_map_obj = weak_map->next(); |