diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Heap/Heap.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Heap/Heap.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp index 0c46359a2d..a233864ef7 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.cpp +++ b/Userland/Libraries/LibJS/Heap/Heap.cpp @@ -226,8 +226,8 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure allocator_for_size(block->cell_size()).block_did_become_usable({}, *block); } - for (auto* weak_container : m_weak_containers) - weak_container->remove_swept_cells({}, swept_cells); + for (auto& weak_container : m_weak_containers) + weak_container.remove_swept_cells({}, swept_cells); if constexpr (HEAP_DEBUG) { for_each_block([&](auto& block) { @@ -282,14 +282,14 @@ void Heap::did_destroy_marked_value_list(Badge<MarkedValueList>, MarkedValueList void Heap::did_create_weak_container(Badge<WeakContainer>, WeakContainer& set) { - VERIFY(!m_weak_containers.contains(&set)); - m_weak_containers.set(&set); + VERIFY(!m_weak_containers.contains(set)); + m_weak_containers.append(set); } void Heap::did_destroy_weak_container(Badge<WeakContainer>, WeakContainer& set) { - VERIFY(m_weak_containers.contains(&set)); - m_weak_containers.remove(&set); + VERIFY(m_weak_containers.contains(set)); + m_weak_containers.remove(set); } void Heap::defer_gc(Badge<DeferGC>) |