зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
c64b56b9b3
Коммит
95770f62ac
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче