Bug 1311620 - Part 2: Don't call StyleAnimationValue::GetUnit() against uninitialized values, use IsNull() instead. r?birtles
MozReview-Commit-ID: JAcHqsgpdDB
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -584,19 +584,18 @@ struct StyleAnimationValueCompositePair
static StyleAnimationValue
SampleValue(float aPortion, const Animation& aAnimation,
const StyleAnimationValueCompositePair& aStart,
const StyleAnimationValueCompositePair& aEnd,
const StyleAnimationValue& aLastValue,
uint64_t aCurrentIteration,
const StyleAnimationValue& aUnderlyingValue)
{
- NS_ASSERTION(aStart.mValue.GetUnit() == aEnd.mValue.GetUnit() ||
- aStart.mValue.GetUnit() == StyleAnimationValue::eUnit_None ||
- aEnd.mValue.GetUnit() == StyleAnimationValue::eUnit_None,
+ NS_ASSERTION(aStart.mValue.IsNull() || aEnd.mValue.IsNull() ||
+ aStart.mValue.GetUnit() == aEnd.mValue.GetUnit(),
"Must have same unit");
StyleAnimationValue startValue =
dom::KeyframeEffectReadOnly::CompositeValue(aAnimation.property(),
aStart.mValue,
aUnderlyingValue,
aStart.mComposite);
StyleAnimationValue endValue =