Bug 188519

Summary: [Web Animations] Crash under AnimationTimeline::cancelOrRemoveDeclarativeAnimation()
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dexxenon, dino, eric.carlson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=188253
Attachments:
Description Flags
Patch eric.carlson: review+

Description Antoine Quint 2018-08-13 10:09:30 PDT
When loading www.seloger.com we crash in AnimationTimeline::cancelOrRemoveDeclarativeAnimation() with a null `animation` parameter.
Comment 1 Antoine Quint 2018-08-13 10:10:31 PDT
We also have a crash in this function in webkit.org/b/188253.
Comment 2 Radar WebKit Bug Importer 2018-08-13 10:11:16 PDT
<rdar://problem/43237889>
Comment 3 Antoine Quint 2018-08-13 10:12:00 PDT
I also came across webkit.org/b/188518 trying to figure out why the site was crashing. To reproduce this crash, we need to comment out the ASSERT() from that other bug.
Comment 4 Antoine Quint 2018-08-13 11:24:40 PDT
In this case we would crash because we blindly assumed an animation that was found in the previous style must be in the list of running animations but in fact it could have been removed already due to the element being removed from the DOM. So when we iterate over names of animations that were found in the previous style but not in the new style, we must make a null check to ensure that there is an animation to remove. Adding an ASSERT() in AnimationTimeline::cancelOrRemoveDeclarativeAnimation() will also clarify the contract here.
Comment 5 Antoine Quint 2018-08-13 11:29:55 PDT
*** Bug 188253 has been marked as a duplicate of this bug. ***
Comment 6 Antoine Quint 2018-08-14 07:23:45 PDT
Created attachment 347072 [details]
Patch
Comment 7 Antoine Quint 2018-08-14 08:15:14 PDT
Committed r234848: <https://trac.webkit.org/changeset/234848>