Bug 944353. If we've had a decoder error then the image is not usable. r=seth a=sledru
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 26 Feb 2014 21:48:51 -0600
changeset 183726 d27facd3d35dab5422889e64ae1784b01c86e46a
parent 183725 1cf083a2ffe711e881a1ccb662fb775ad0940bcc
child 183727 31aca79a5126922441836ec183cb57cbafadc1ee
push id3459
push usertnikkel@gmail.com
push dateSun, 13 Apr 2014 03:56:53 +0000
treeherdermozilla-beta@d27facd3d35d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth, sledru
bugs944353
milestone29.0
Bug 944353. If we've had a decoder error then the image is not usable. r=seth a=sledru This matches what RasterImage will do.
image/src/Decoder.cpp
--- a/image/src/Decoder.cpp
+++ b/image/src/Decoder.cpp
@@ -150,17 +150,17 @@ Decoder::Finish(RasterImage::eShutdownIn
                          NS_ConvertUTF8toUTF16(mImage.GetURIString()),
                          EmptyString(), 0, 0, nsIScriptError::errorFlag,
                          "Image", mImage.InnerWindowID()
                        ))) {
         consoleService->LogMessage(errorObject);
       }
     }
 
-    bool usable = true;
+    bool usable = !HasDecoderError();
     if (aShutdownIntent != RasterImage::eShutdownIntent_NotNeeded && !HasDecoderError()) {
       // If we only have a data error, we're usable if we have at least one complete frame.
       if (GetCompleteFrameCount() == 0) {
         usable = false;
       }
     }
 
     // If we're usable, do exactly what we should have when the decoder