Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 2c98b7adc4e47a01103168d819a1117dc99c0ccb..257af3739fa2a090df2793174df55f038fe9494a 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -2647,7 +2647,6 @@ void MarkCompactCollector::AbortWeakCollections() { |
void MarkCompactCollector::ProcessAndClearWeakCells() { |
- HeapObject* the_hole = heap()->the_hole_value(); |
Object* weak_cell_obj = heap()->encountered_weak_cells(); |
while (weak_cell_obj != Smi::FromInt(0)) { |
WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj); |
@@ -2682,19 +2681,18 @@ void MarkCompactCollector::ProcessAndClearWeakCells() { |
RecordSlot(slot, slot, *slot); |
} |
weak_cell_obj = weak_cell->next(); |
- weak_cell->set_next(the_hole, SKIP_WRITE_BARRIER); |
+ weak_cell->clear_next(heap()); |
} |
heap()->set_encountered_weak_cells(Smi::FromInt(0)); |
} |
void MarkCompactCollector::AbortWeakCells() { |
- Object* the_hole = heap()->the_hole_value(); |
Object* weak_cell_obj = heap()->encountered_weak_cells(); |
while (weak_cell_obj != Smi::FromInt(0)) { |
WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj); |
weak_cell_obj = weak_cell->next(); |
- weak_cell->set_next(the_hole, SKIP_WRITE_BARRIER); |
+ weak_cell->clear_next(heap()); |
} |
heap()->set_encountered_weak_cells(Smi::FromInt(0)); |
} |