From fde95fcc033216ca60b338b668330ac1d55869f9 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Fri, 4 Mar 2016 21:54:03 -0600 Subject: [PATCH] Bug 1251405. Part 2. Use 64 bit ints to hold the delay between the current time and the last animation time. r=edwin When storing ms, 32 bit ints can hold 2^32/1000/60/60/24 ~= 49 days. It's quite conceivable that someone would leave a tab in the background for 50 days. --- image/FrameAnimator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/FrameAnimator.cpp b/image/FrameAnimator.cpp index 0f3c3436d50..e991b61334b 100644 --- a/image/FrameAnimator.cpp +++ b/image/FrameAnimator.cpp @@ -192,7 +192,7 @@ FrameAnimator::AdvanceFrame(TimeStamp aTime) if (delay.ToMilliseconds() > loopTime) { // Explicitly use integer division to get the floor of the number of // loops. - uint32_t loops = static_cast(delay.ToMilliseconds()) / loopTime; + uint64_t loops = static_cast(delay.ToMilliseconds()) / loopTime; mCurrentAnimationFrameTime += TimeDuration::FromMilliseconds(loops * loopTime); }