Bug 1353607. P11 - use TimeUnit in RecomputeDuration(). draft
authorJW Wang <jwwang@mozilla.com>
Wed, 29 Mar 2017 14:52:08 +0800
changeset 557658 cfc53067374ef073389194c7d40633d2617a10a8
parent 557657 eda12887ebd09b3fa0e05a011d3c4c304a72e012
child 557659 3610ce907c1bb8debeaebbd539ca303f3a886ba4
push id52775
push userjwwang@mozilla.com
push dateFri, 07 Apr 2017 03:28:07 +0000
bugs1353607
milestone55.0a1
Bug 1353607. P11 - use TimeUnit in RecomputeDuration(). MozReview-Commit-ID: F16erI0580V
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2991,17 +2991,17 @@ void MediaDecoderStateMachine::Recompute
   // The duration is always exactly known with MSE and there's no need to adjust
   // it based on what may have been seen in the past; in particular as this data
   // may no longer exist such as when the mediasource duration was reduced.
   if (mExplicitDuration.Ref().isNothing()
       && duration < mObservedDuration.Ref()) {
     duration = mObservedDuration;
   }
 
-  MOZ_ASSERT(duration.ToMicroseconds() >= 0);
+  MOZ_ASSERT(duration >= TimeUnit::Zero());
   mDuration = Some(duration);
 }
 
 RefPtr<ShutdownPromise>
 MediaDecoderStateMachine::Shutdown()
 {
   MOZ_ASSERT(OnTaskQueue());
   return mStateObj->HandleShutdown();