Bug 1084136 (Part 4) - Record STATUS_DECODE_COMPLETE even if there's an error. r=tn

--HG--
extra : rebase_source : 9d5ba3964faf1fe2d28020050a0d89fa5cbc5bb0
This commit is contained in:
Seth Fowler 2014-11-06 17:33:58 -08:00
parent 8de98648d8
commit 483bb40bfa

View File

@ -699,13 +699,13 @@ imgStatusTracker::SendStopFrame(imgRequestProxy* aProxy)
void
imgStatusTracker::RecordStopDecode(nsresult aStatus)
{
NS_ABORT_IF_FALSE(mImage,
"RecordStopDecode called before we have an Image");
MOZ_ASSERT(mImage, "RecordStopDecode called before we have an Image");
mState |= FLAG_DECODE_STOPPED;
mImageStatus |= imgIRequest::STATUS_DECODE_COMPLETE;
mImageStatus &= ~imgIRequest::STATUS_DECODE_STARTED;
if (NS_SUCCEEDED(aStatus) && !(mImageStatus & imgIRequest::STATUS_ERROR)) {
mImageStatus |= imgIRequest::STATUS_DECODE_COMPLETE;
mImageStatus &= ~imgIRequest::STATUS_DECODE_STARTED;
mHasBeenDecoded = true;
} else {
mImageStatus |= imgIRequest::STATUS_ERROR;