Bug 958806. If our decoder shutdown intent was "not needed" then we shouldn't try to request a full decode of the image, it was not needed. r=seth
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 17 Jan 2014 23:14:46 -0600
changeset 164121 28686e41cdf836698b4388122c0563e1e2e40bf3
parent 164120 b07b7fca7f6c44d16d0b514160ff01f494023443
child 164122 ae1c7e26a97dbb4ae49f78504ec10189982d6dbb
push id26026
push userphilringnalda@gmail.com
push dateSat, 18 Jan 2014 23:17:27 +0000
treeherdermozilla-central@61fd0f987cf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs958806
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 958806. If our decoder shutdown intent was "not needed" then we shouldn't try to request a full decode of the image, it was not needed. r=seth
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -2922,17 +2922,17 @@ RasterImage::RequestDecodeIfNeeded(nsres
                                    eShutdownIntent aIntent,
                                    bool aDone,
                                    bool aWasSize)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   // If we were a size decode and a full decode was requested, now's the time.
   if (NS_SUCCEEDED(aStatus) &&
-      aIntent != eShutdownIntent_Error &&
+      aIntent == eShutdownIntent_Done &&
       aDone &&
       aWasSize &&
       mWantFullDecode) {
     mWantFullDecode = false;
 
     // If we're not meant to be storing source data and we just got the size,
     // we need to synchronously flush all the data we got to a full decoder.
     // When that decoder is shut down, we'll also clear our source data.