[tor-commits] [tor-browser/esr24] Bug 944353. If we've encountered an error while decoding an image and the main thread has asked to do more decoding of that image before the main thread has acknowledged the error then refuse to decode more. r=seth a=sledru

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:39 UTC 2014


commit 69f9b401dfffdc377205f0fa77d0894a812ad9d6
Author: Timothy Nikkel <tnikkel at gmail.com>
Date:   Wed Feb 26 21:48:47 2014 -0600

    Bug 944353. If we've encountered an error while decoding an image and the main thread has asked to do more decoding of that image before the main thread has acknowledged the error then refuse to decode more. r=seth a=sledru
---
 image/src/RasterImage.cpp |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp
index 8b066434..42d4232 100644
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -3398,6 +3398,11 @@ RasterImage::DecodePool::DecodeSomeOfImage(RasterImage* aImg,
   if (aImg->mError)
     return NS_OK;
 
+  // If there is an error worker pending (say because the main thread has enqueued
+  // another decode request for us before processing the error worker) then bail out.
+  if (aImg->mPendingError)
+    return NS_OK;
+
   // If mDecoded or we don't have a decoder, we must have finished already (for
   // example, a synchronous decode request came while the worker was pending).
   if (!aImg->mDecoder || aImg->mDecoded)





More information about the tor-commits mailing list