Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r?birltes draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Mon, 03 Oct 2016 18:47:15 +0900
changeset 420109 04d24c64bb22e5199cbe6c8795f306e82e25334f
parent 420108 a5f8f411333abcf721168266f7a0c6349262852a
child 420110 dffd0cb4f119c72037a889a7109ee15a2b9ac220
push id31094
push userbmo:hiikezoe@mozilla-japan.org
push dateMon, 03 Oct 2016 10:02:30 +0000
reviewersbirltes
bugs1304922
milestone52.0a1
Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r?birltes MozReview-Commit-ID: Bqei8XSb0wV
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;
     }