Bug 695498. Cleanup WriteToDecoder a little. r=bholley

Removes the unobvious CONTAINER_ENSURE() which makes the fact that we only
adjust mBytesDecoded when we don't have success more obvious. This also takes
out a check for mDecoder that is unneeded because of the kungFuDeathGrip.
This commit is contained in:
Jeff Muizelaar 2011-10-19 14:48:18 -04:00
Родитель c64b56b9b3
Коммит 95770f62ac
1 изменённых файлов: 7 добавлений и 10 удалений

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

@ -2291,16 +2291,13 @@ RasterImage::WriteToDecoder(const char *aBuffer, PRUint32 aCount)
curframe->UnlockImageData();
}
if (!mDecoder)
return NS_ERROR_FAILURE;
CONTAINER_ENSURE_SUCCESS(mDecoder->GetDecoderError());
// Keep track of the total number of bytes written over the lifetime of the
// decoder
mBytesDecoded += aCount;
return NS_OK;
nsresult status = mDecoder->GetDecoderError();
if (NS_SUCCEEDED(status)) {
// Keep track of the total number of bytes written over the lifetime of the
// decoder
mBytesDecoded += aCount;
}
return status;
}
// This function is called in situations where it's clear that we want the