Bug 627015 - Sometimes, images pause mid-frame when downloading. We handle this just fine, but unfortunately we assert that it's not the case. Since this assertion is just bogus, delete it. r=jrmuizel
authorJoe Drew <joe@drew.ca>
Wed, 03 Aug 2011 15:19:44 -0400
changeset 73793 6b5c54d65a8023e93c76a6f3d42ee3f62d3fda8f
parent 73792 b38381eb91b8cbedb4f0d13963399944f9b07bcf
child 73794 20c37bc3110294ca573bc938f4e4048a74334b3a
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersjrmuizel
bugs627015
milestone8.0a1
Bug 627015 - Sometimes, images pause mid-frame when downloading. We handle this just fine, but unfortunately we assert that it's not the case. Since this assertion is just bogus, delete it. r=jrmuizel
modules/libpr0n/src/RasterImage.cpp
--- a/modules/libpr0n/src/RasterImage.cpp
+++ b/modules/libpr0n/src/RasterImage.cpp
@@ -1443,23 +1443,21 @@ RasterImage::Notify(nsITimer *timer)
   PRUint32 nextFrameIndex = mAnim->currentAnimationFrameIndex + 1;
   PRInt32 timeout = 0;
 
   // Figure out if we have the next full frame. This is more complicated than
   // just checking for mFrames.Length() because decoders append their frames
   // before they're filled in.
   NS_ABORT_IF_FALSE(mDecoder || nextFrameIndex <= mFrames.Length(),
                     "How did we get 2 indicies too far by incrementing?");
+
+  // If we don't have a decoder, we know we've got everything we're going to get.
+  // If we do, we only display fully-downloaded frames; everything else gets delayed.
   bool haveFullNextFrame = !mDecoder || nextFrameIndex < mDecoder->GetCompleteFrameCount();
 
-  // If we don't have the next full frame, it had better be in the pipe.
-  NS_ABORT_IF_FALSE(haveFullNextFrame ||
-                    (mDecoder && mFrames.Length() > mDecoder->GetCompleteFrameCount()),
-                    "What is the next frame supposed to be?");
-
   // If we're done decoding the next frame, go ahead and display it now and
   // reinit the timer with the next frame's delay time.
   if (haveFullNextFrame) {
     if (mFrames.Length() == nextFrameIndex) {
       // End of Animation
 
       // If animation mode is "loop once", it's time to stop animating
       if (mAnimationMode == kLoopOnceAnimMode || mLoopCount == 0) {