Bug 859718 - Don't assume we have mImageRequest in RasterImage::IsDecodeFinished. r=joe

--HG--
extra : rebase_source : ec57c42b17398f0c90d19f35834e389444059b7f
This commit is contained in:
Seth Fowler 2013-04-15 14:34:18 -07:00
Родитель 5537f1395c
Коммит d66ab16c15
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -3278,7 +3278,6 @@ RasterImage::IsDecodeFinished()
// Precondition
mDecodingMutex.AssertCurrentThreadOwns();
NS_ABORT_IF_FALSE(mDecoder, "Can't call IsDecodeFinished() without decoder!");
MOZ_ASSERT(mDecodeRequest);
// The decode is complete if we got what we wanted.
if (mDecoder->IsSizeDecode()) {
@ -3288,11 +3287,12 @@ RasterImage::IsDecodeFinished()
} else if (mDecoder->GetDecodeDone()) {
return true;
}
// If the decoder returned because it needed a new frame and we haven't
// written to it since then, the decoder may be storing data that it hasn't
// decoded yet.
if (mDecoder->NeedsNewFrame() || mDecodeRequest->mAllocatedNewFrame) {
if (mDecoder->NeedsNewFrame() ||
(mDecodeRequest && mDecodeRequest->mAllocatedNewFrame)) {
return false;
}