Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r=birtles
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 05 Oct 2016 14:58:07 +0900
changeset 316519 679f93a3e5db971b95d200b4c8b0c33c6c614c43
parent 316518 d16bd0cb151149373f48ef3299f1481a29306d3c
child 316520 4372532be22197d6d182073023358431617574ba
push id32852
push userhiikezoe@mozilla-japan.org
push dateWed, 05 Oct 2016 09:51:38 +0000
treeherderautoland@4372532be221 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1304922
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
     }