LibWeb: Clear all active timers when document is destroyed

This change implements a step from the document's destroy procedure in
the specification, saying that all active timers should be cleared.

By doing this, we also fix the leaking of a document in case where we
have navigated away from a page that has scheduled timers that haven't
yet been triggered.
This commit is contained in:
Aliaksandr Kalenik 2023-09-26 11:44:56 +02:00 committed by Andreas Kling
commit 67c727177e
Notes: sideshowbarker 2024-07-17 08:45:34 +09:00
6 changed files with 44 additions and 1 deletions

View file

@ -545,6 +545,8 @@ private:
void tear_down_layout_tree();
void run_unloading_cleanup_steps();
void evaluate_media_rules();
WebIDL::ExceptionOr<void> run_the_document_write_steps(StringView);