mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibJS: GC should gather roots from all active interpreters
If we are in a nested execution context, we shouldn't only mark things used by the active interpreter.
This commit is contained in:
@@ -82,4 +82,10 @@ VM::InterpreterScope::~InterpreterScope()
|
||||
m_interpreter.vm().pop_interpreter(m_interpreter);
|
||||
}
|
||||
|
||||
void VM::gather_roots(HashTable<Cell*>& roots)
|
||||
{
|
||||
for (auto* interpreter : m_interpreters)
|
||||
interpreter->gather_roots(roots);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user