From e2a4105660b31d3791de8263a17261e3efbe3208 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Mon, 15 Aug 2011 17:58:52 -0700 Subject: [PATCH] Bug 678822: Skip call to nsSMILAnimationFunction::GetAccumulate() if we've had parse errors. r=birtles --- content/smil/crashtests/678822-1.svg | 3 +++ content/smil/crashtests/crashtests.list | 1 + content/smil/nsSMILAnimationFunction.cpp | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 content/smil/crashtests/678822-1.svg diff --git a/content/smil/crashtests/678822-1.svg b/content/smil/crashtests/678822-1.svg new file mode 100644 index 000000000000..a5e81ee10ff5 --- /dev/null +++ b/content/smil/crashtests/678822-1.svg @@ -0,0 +1,3 @@ + + + diff --git a/content/smil/crashtests/crashtests.list b/content/smil/crashtests/crashtests.list index 1819b698552c..8975b1b37bae 100644 --- a/content/smil/crashtests/crashtests.list +++ b/content/smil/crashtests/crashtests.list @@ -38,3 +38,4 @@ load 665334-1.svg load 669225-1.svg load 670313-1.svg load 669225-2.svg +load 678822-1.svg diff --git a/content/smil/nsSMILAnimationFunction.cpp b/content/smil/nsSMILAnimationFunction.cpp index 7183731a675a..1763381c0ad2 100644 --- a/content/smil/nsSMILAnimationFunction.cpp +++ b/content/smil/nsSMILAnimationFunction.cpp @@ -187,7 +187,9 @@ nsSMILAnimationFunction::SampleAt(nsSMILTime aSampleTime, !IsValueFixedForSimpleDuration(); // Are we on a new repeat and accumulating across repeats? - mHasChanged |= (mRepeatIteration != aRepeatIteration) && GetAccumulate(); + if (!mErrorFlags) { // (can't call GetAccumulate() if we've had parse errors) + mHasChanged |= (mRepeatIteration != aRepeatIteration) && GetAccumulate(); + } mSampleTime = aSampleTime; mSimpleDuration = aSimpleDuration;