1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +00:00

LibWeb: Stop timers when finalizing a Window or WorkerGlobalScope

This avoids an assertion that timers are not active when destroyed.
This commit is contained in:
Andreas Kling 2024-01-03 10:10:47 +01:00
parent b4eb66d9fe
commit 40f87f0954
6 changed files with 20 additions and 0 deletions

View file

@ -55,6 +55,12 @@ void WorkerGlobalScope::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_page);
}
void WorkerGlobalScope::finalize()
{
Base::finalize();
WindowOrWorkerGlobalScopeMixin::finalize();
}
void WorkerGlobalScope::set_internal_port(JS::NonnullGCPtr<MessagePort> port)
{
m_internal_port = port;