mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +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:
parent
31bb107922
commit
fbe2907510
5 changed files with 11 additions and 5 deletions
|
@ -105,9 +105,7 @@ void Heap::collect_garbage(CollectionType collection_type, bool print_report)
|
|||
|
||||
void Heap::gather_roots(HashTable<Cell*>& roots)
|
||||
{
|
||||
if (auto* interpreter = vm().interpreter_if_exists())
|
||||
interpreter->gather_roots({}, roots);
|
||||
|
||||
vm().gather_roots(roots);
|
||||
gather_conservative_roots(roots);
|
||||
|
||||
for (auto* handle : m_handles)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue