Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 02706b24ebb2968054e8e15002cc0345f22a4502
https://github.com/WebKit/WebKit/commit/02706b24ebb2968054e8e15002cc0345f22a4502
Author: Pawel Lampe <[email protected]>
Date: 2026-07-15 (Wed, 15 Jul 2026)
Changed paths:
A
LayoutTests/webanimations/animation-objects-leaking-bug-318856-expected.txt
A LayoutTests/webanimations/animation-objects-leaking-bug-318856.html
M Source/WebCore/animation/WebAnimation.cpp
Log Message:
-----------
Unbounded memory growth due to CSSAnimation object retention cycle
https://bugs.webkit.org/show_bug.cgi?id=318856
Reviewed by Antoine Quint.
Currently, if JS wrappers of regular CSS animations are crated e.g. due
to getAnimations() call, they will retain CSSAnimations forever as they
are never GC-able due to WebAnimation::virtualHasPendingActivity()
formula.
This change modifies the formula to take into account that on a
monotonic timeline, a canceled (idle) animation cannot become relevant
again unless a script holds a reference to it. This way, under that
circumstances, the JS wrappers may be allowed to be GC-ed and hence
the CSSAnimation objects can be freed thus not leading to unbounded
memory growth.
This change also adds a test case that verifies the above.
Co-authored with Claude.
Canonical link: https://commits.webkit.org/317227@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications