Skip to content
Permalink
Browse files
Calling SVGAnimatedPropertyTearOff::animationEnded() will crash if th…
…e SVG property is not animating

https://bugs.webkit.org/show_bug.cgi?id=156549

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-04-15
Reviewed by Darin Adler.

A speculative fix for a crash which may happen when calling animationEnded()
of any SVGAnimatedProperty while it is not animating.

* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::executeAction):

Canonical link: https://commits.webkit.org/174737@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Said Abou-Hallawa authored and webkit-commit-queue committed Apr 15, 2016
1 parent f6fceee commit d17c1f810ae9531cb11bfcfb8d67d10de69ff9c2
Showing with 15 additions and 1 deletion.
  1. +13 −0 Source/WebCore/ChangeLog
  2. +2 −1 Source/WebCore/svg/SVGAnimatedTypeAnimator.h
@@ -1,3 +1,16 @@
2016-04-15 Said Abou-Hallawa <sabouhallawa@apple.com>

Calling SVGAnimatedPropertyTearOff::animationEnded() will crash if the SVG property is not animating
https://bugs.webkit.org/show_bug.cgi?id=156549

Reviewed by Darin Adler.

A speculative fix for a crash which may happen when calling animationEnded()
of any SVGAnimatedProperty while it is not animating.

* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::executeAction):

2016-04-15 Jer Noble <jer.noble@apple.com>

Unreviewed build fix for iOS simulator. Assert the correct variable.
@@ -201,7 +201,8 @@ class SVGAnimatedTypeAnimator {
break;
case StopAnimationAction:
ASSERT(!type);
property->animationEnded();
if (property->isAnimating())
property->animationEnded();
break;
case AnimValWillChangeAction:
ASSERT(!type);

0 comments on commit d17c1f8

Please sign in to comment.