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

This commit is contained in:
Timothy Nikkel 2014-02-26 21:48:47 -06:00
Родитель ce84411c22
Коммит 520961becf
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -3360,6 +3360,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)