mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 859718 - Don't assume we have mImageRequest in RasterImage::IsDecodeFinished. r=joe
--HG-- extra : rebase_source : ec57c42b17398f0c90d19f35834e389444059b7f
This commit is contained in:
parent
5537f1395c
commit
d66ab16c15
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user