mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 516265 - GIF Decoder doesn't send close notifications if it never gets a size. r=joe
This commit is contained in:
parent
c32d750749
commit
c1225c588a
@ -122,6 +122,7 @@ nsGIFDecoder2::nsGIFDecoder2()
|
||||
, mGIFOpen(PR_FALSE)
|
||||
, mSawTransparency(PR_FALSE)
|
||||
, mError(PR_FALSE)
|
||||
, mEnded(PR_FALSE)
|
||||
{
|
||||
// Clear out the structure, excluding the arrays
|
||||
memset(&mGIFStruct, 0, sizeof(mGIFStruct));
|
||||
@ -338,7 +339,7 @@ void nsGIFDecoder2::BeginGIF()
|
||||
//******************************************************************************
|
||||
void nsGIFDecoder2::EndGIF(PRBool aSuccess)
|
||||
{
|
||||
if (!mGIFOpen)
|
||||
if (mEnded)
|
||||
return;
|
||||
|
||||
if (aSuccess)
|
||||
@ -353,6 +354,7 @@ void nsGIFDecoder2::EndGIF(PRBool aSuccess)
|
||||
mImageContainer->SetLoopCount(mGIFStruct.loop_count);
|
||||
|
||||
mGIFOpen = PR_FALSE;
|
||||
mEnded = PR_TRUE;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
@ -114,6 +114,7 @@ private:
|
||||
PRPackedBool mGIFOpen;
|
||||
PRPackedBool mSawTransparency;
|
||||
PRPackedBool mError;
|
||||
PRPackedBool mEnded;
|
||||
|
||||
gif_struct mGIFStruct;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user