Bug 1137058 - Increment RasterImage::mLockCount to ensure that non-discardable images don't eventually become unlocked. r=tn, a=lmandel
authorSeth Fowler <seth@mozilla.com>
Tue, 17 Mar 2015 19:40:17 -0700
changeset 250456 52b55d9c1d61
parent 250455 fb9ae74a783a
child 250457 2445fcfe99d4
push id4592
push userryanvm@gmail.com
push date2015-03-19 20:47 +0000
treeherdermozilla-beta@52b55d9c1d61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, lmandel
bugs1137058
milestone37.0
Bug 1137058 - Increment RasterImage::mLockCount to ensure that non-discardable images don't eventually become unlocked. r=tn, a=lmandel
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -320,16 +320,17 @@ RasterImage::Init(const char* aMimeType,
 
 #ifndef MOZ_ENABLE_SKIA
   // Downscale-during-decode requires Skia.
   mDownscaleDuringDecode = false;
 #endif
 
   // Lock this image's surfaces in the SurfaceCache if we're not discardable.
   if (!mDiscardable) {
+    mLockCount++;
     SurfaceCache::LockImage(ImageKey(this));
   }
 
   // Create the initial size decoder.
   nsresult rv = Decode(Nothing(), DECODE_FLAGS_DEFAULT);
   if (NS_FAILED(rv)) {
     return NS_ERROR_FAILURE;
   }