[Web Animations] Crash accessing CSSAnimation::bindingsCurrentTime when effect has...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 19:28:41 +0000 (19:28 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 19:28:41 +0000 (19:28 +0000)
commit46e8d743c1ce1dfb1ab6e6402715cf50977d4743
tree6b1c7d9b59dba4e40da4ec9771da74ab5c654672
parent7625bf005507eecdd513e7e2e622655adeb9e151
[Web Animations] Crash accessing CSSAnimation::bindingsCurrentTime when effect has been set to null
https://bugs.webkit.org/show_bug.cgi?id=187950
<rdar://problem/42515747>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/accessing-current-time-after-clearing-css-animation-effect.html

While a CSSAnimation has an effect created for it by the implementation, the developer may yet manipulate
its effect via the Web Animations API and set it to null. As such, we must not assume it's always non-null.

* animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::bindingsCurrentTime const):

LayoutTests:

Add a new test where we check that the current time of a CSSAnimation can be accessed after setting its effect to null.

* webanimations/accessing-current-time-after-clearing-css-animation-effect-expected.txt: Added.
* webanimations/accessing-current-time-after-clearing-css-animation-effect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webanimations/accessing-current-time-after-clearing-css-animation-effect-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/accessing-current-time-after-clearing-css-animation-effect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/CSSAnimation.cpp