1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibJS: Only consider VM-accessible execution contexts as strong roots

Partially reverts 3dc5f467a8 to fix
GC memory leak that happens because we treated all execution contexts
as strong roots.
This commit is contained in:
Aliaksandr Kalenik 2023-12-13 10:24:30 +01:00 committed by Andreas Kling
parent cbb660c756
commit b108d51c5b
9 changed files with 32 additions and 18 deletions

View file

@ -450,9 +450,6 @@ void Heap::mark_live_cells(HashMap<Cell*, HeapRoot> const& roots)
MarkingVisitor visitor(*this, roots);
for (auto& execution_context : m_execution_contexts)
execution_context.visit_edges(visitor);
vm().bytecode_interpreter().visit_edges(visitor);
visitor.mark_all_live_cells();