mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
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:
parent
73ef102b01
commit
67c727177e
6 changed files with 44 additions and 1 deletions
|
@ -46,6 +46,7 @@ public:
|
|||
i32 set_interval(TimerHandler, i32 timeout, JS::MarkedVector<JS::Value> arguments);
|
||||
void clear_timeout(i32);
|
||||
void clear_interval(i32);
|
||||
void clear_map_of_active_timers();
|
||||
|
||||
PerformanceTimeline::PerformanceEntryTuple& relevant_performance_entry_tuple(FlyString const& entry_type);
|
||||
void queue_performance_entry(JS::NonnullGCPtr<PerformanceTimeline::PerformanceEntry> new_entry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue