Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 05 Oct 2016 14:58:07 +0900
changeset 421036 832739dd926706bf393bdcf3a9f626d6cfcd4567
parent 421035 2e3149305df019ce32b91854686a15690b8daba4
child 421037 54061593b7a5468c2ee58225935816175912c987
push id31361
push userbmo:hiikezoe@mozilla-japan.org
push dateWed, 05 Oct 2016 06:56:42 +0000
reviewersbirtles
bugs1304922
milestone52.0a1
Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r?birtles MozReview-Commit-ID: A4h270gOPOR
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -102,22 +102,22 @@ ElementPropertyTransition::UpdateStartVa
     StyleAnimationValue startValue;
     if (StyleAnimationValue::Interpolate(mProperties[0].mProperty,
                                          mReplacedTransition->mFromValue,
                                          mReplacedTransition->mToValue,
                                          valuePosition, startValue)) {
       MOZ_ASSERT(mProperties.Length() == 1 &&
                  mProperties[0].mSegments.Length() == 1,
                  "The transition should have one property and one segment");
-      mProperties[0].mSegments[0].mFromValue = Move(startValue);
       nsCSSValue cssValue;
       DebugOnly<bool> uncomputeResult =
         StyleAnimationValue::UncomputeValue(mProperties[0].mProperty,
                                             startValue,
                                             cssValue);
+      mProperties[0].mSegments[0].mFromValue = Move(startValue);
       MOZ_ASSERT(uncomputeResult, "UncomputeValue should not fail");
       MOZ_ASSERT(mKeyframes.Length() == 2,
           "Transitions should have exactly two animation keyframes");
       MOZ_ASSERT(mKeyframes[0].mPropertyValues.Length() == 1,
           "Transitions should have exactly one property in their first "
           "frame");
       mKeyframes[0].mPropertyValues[0].mValue = cssValue;
     }