| Index: src/objects-visiting-inl.h
|
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
|
| index 057b8ae99ffc3651e80b729c6f96f9335cb342a3..ec7fd79a8d37d9db3dda2645c51c0e896c50cd6f 100644
|
| --- a/src/objects-visiting-inl.h
|
| +++ b/src/objects-visiting-inl.h
|
| @@ -402,12 +402,11 @@ void StaticMarkingVisitor<StaticVisitor>::VisitWeakCollection(
|
| Heap* heap = map->GetHeap();
|
| JSWeakCollection* weak_collection =
|
| reinterpret_cast<JSWeakCollection*>(object);
|
| - MarkCompactCollector* collector = heap->mark_compact_collector();
|
|
|
| // Enqueue weak collection in linked list of encountered weak collections.
|
| if (weak_collection->next() == heap->undefined_value()) {
|
| - weak_collection->set_next(collector->encountered_weak_collections());
|
| - collector->set_encountered_weak_collections(weak_collection);
|
| + weak_collection->set_next(heap->encountered_weak_collections());
|
| + heap->set_encountered_weak_collections(weak_collection);
|
| }
|
|
|
| // Skip visiting the backing hash table containing the mappings and the
|
|
|