1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 11:34:59 +00:00

LibJS: Make sure JS::Script visits its HostDefined object

This allows JS::Script to mark its corresponding HTML::Script, even if
it's a little roundabout looking. Fixes an issue where the JS::Script
was kept alive by the execution stack, but the HTML::Script was gone.

This was originally part of 8f9ed415a0
but got lost in a merging accident.
This commit is contained in:
Andreas Kling 2022-09-06 01:19:58 +02:00
parent 88f2f50c55
commit d13d571844

View file

@ -43,6 +43,8 @@ void Script::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_realm);
if (m_host_defined)
m_host_defined->visit_host_defined_self(visitor);
}
}