Bug 1474213 - Add another assertion in DocumentTimeline::NotifyAnimationUpdated checking the animation's timeline is the DocumentTimeline. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 09 Jul 2018 07:16:37 +0900
changeset 815508 273539e248701b9b1ada5a32b93152e512cb365f
parent 815507 8a52143a30aa3e40d6f56606c277f3f3608ba30a
child 815509 dcca842d8530aed17e627fc4af5df4f0c4199800
push id115520
push userbmo:hikezoe@mozilla.com
push dateSun, 08 Jul 2018 22:24:35 +0000
reviewersbirtles
bugs1474213
milestone63.0a1
Bug 1474213 - Add another assertion in DocumentTimeline::NotifyAnimationUpdated checking the animation's timeline is the DocumentTimeline. r?birtles MozReview-Commit-ID: 1J68IdoH3sy
dom/animation/DocumentTimeline.cpp
--- a/dom/animation/DocumentTimeline.cpp
+++ b/dom/animation/DocumentTimeline.cpp
@@ -128,16 +128,19 @@ DocumentTimeline::ToTimelineTime(const T
                   - timing->GetNavigationStartTimeStamp()
                   - mOriginTime);
   return result;
 }
 
 void
 DocumentTimeline::NotifyAnimationUpdated(Animation& aAnimation)
 {
+  MOZ_ASSERT(aAnimation.GetTimeline() == this,
+             "Should be used for animations that the animation's timeline "
+             "is this DocumentTimeline");
   MOZ_ASSERT(aAnimation.GetTimelineDocument() &&
                aAnimation.GetTimelineDocument() == mDocument,
              "Should be used for animations that the animation's timeline "
              "document is the same document of this DocumentTimeline");
 
   AnimationTimeline::NotifyAnimationUpdated(aAnimation);
 
   if (!mIsObservingRefreshDriver) {