mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
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:
parent
d8cdf2fb12
commit
fcb2132a9d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user