Title: [294497] trunk/Source/WebCore/animation/KeyframeEffect.cpp
- Revision
- 294497
- Author
- [email protected]
- Date
- 2022-05-19 11:42:22 -0700 (Thu, 19 May 2022)
Log Message
Need to keep the document alive in KeyframeEffect::processKeyframes()
https://bugs.webkit.org/show_bug.cgi?id=240677
<rdar://93513759>
Reviewed by Saam Barati.
Since the Document is used throughout KeyframeEffect::processKeyframes and it's provided
as a simple reference, we must ensure we keep it alive with a Ref since JS code in a custom
iterator for the keyframes object could cause it to be torn down.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::processKeyframes):
Canonical link: https://commits.webkit.org/250756@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (294496 => 294497)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-05-19 18:32:41 UTC (rev 294496)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-05-19 18:42:22 UTC (rev 294497)
@@ -726,6 +726,8 @@
ExceptionOr<void> KeyframeEffect::processKeyframes(JSGlobalObject& lexicalGlobalObject, Document& document, Strong<JSObject>&& keyframesInput)
{
+ Ref protectedDocument { document };
+
// 1. If object is null, return an empty sequence of keyframes.
if (!keyframesInput.get())
return { };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes