mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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:
parent
b4eb66d9fe
commit
40f87f0954
Notes:
sideshowbarker
2024-07-17 02:08:15 +09:00
Author: https://github.com/awesomekling
Commit: 40f87f0954
Pull-request: https://github.com/SerenityOS/serenity/pull/22549
6 changed files with 20 additions and 0 deletions
|
@ -64,6 +64,11 @@ void WindowOrWorkerGlobalScopeMixin::visit_edges(JS::Cell::Visitor& visitor)
|
|||
entry.value.visit_edges(visitor);
|
||||
}
|
||||
|
||||
void WindowOrWorkerGlobalScopeMixin::finalize()
|
||||
{
|
||||
clear_map_of_active_timers();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin
|
||||
WebIDL::ExceptionOr<String> WindowOrWorkerGlobalScopeMixin::origin() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue