mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibJS: Exclude FinalizationRegistries with queued cleanup jobs from GC
This is done by just adding them to the list of GC roots, which prevents the VM from trying to run cleanup job of garbage collected registries.
This commit is contained in:
parent
df176ca2d9
commit
04359995a7
1 changed files with 3 additions and 0 deletions
|
@ -120,6 +120,9 @@ void VM::gather_roots(HashTable<Cell*>& roots)
|
|||
|
||||
for (auto* job : m_promise_jobs)
|
||||
roots.set(job);
|
||||
|
||||
for (auto* finalization_registry : m_finalization_registry_cleanup_jobs)
|
||||
roots.set(finalization_registry);
|
||||
}
|
||||
|
||||
Symbol* VM::get_global_symbol(const String& description)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue