Bug 820602 - Remove change to decoder notification behavior that causes AWSY leak. r=joe

This commit is contained in:
Seth Fowler 2013-01-25 18:39:11 -08:00
Родитель d4170e5094
Коммит 02254bb9cf
2 изменённых файлов: 4 добавлений и 13 удалений

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

@ -24,7 +24,6 @@ Decoder::Decoder(RasterImage &aImage, imgDecoderObserver* aObserver)
, mSizeDecode(false)
, mInFrame(false)
, mIsAnimated(false)
, mFirstWrite(true)
{
}
@ -43,6 +42,10 @@ Decoder::Init()
// No re-initializing
NS_ABORT_IF_FALSE(!mInitialized, "Can't re-initialize a decoder!");
// Fire OnStartDecode at init time to support bug 512435.
if (!IsSizeDecode() && mObserver)
mObserver->OnStartDecode();
// Implementation-specific initialization
InitInternal();
mInitialized = true;
@ -56,9 +59,6 @@ Decoder::InitSharedDecoder()
// No re-initializing
NS_ABORT_IF_FALSE(!mInitialized, "Can't re-initialize a decoder!");
// Prevent duplicate notifications.
mFirstWrite = false;
// Implementation-specific initialization
InitInternal();
mInitialized = true;
@ -71,14 +71,6 @@ Decoder::Write(const char* aBuffer, uint32_t aCount)
NS_ABORT_IF_FALSE(!HasDecoderError(),
"Not allowed to make more decoder calls after error!");
// If this is our first write, fire OnStartDecode to support bug 512435.
if (mFirstWrite) {
if (!IsSizeDecode() && mObserver)
mObserver->OnStartDecode();
mFirstWrite = false;
}
// If a data error occured, just ignore future data
if (HasDataError())
return;

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

@ -192,7 +192,6 @@ private:
bool mSizeDecode;
bool mInFrame;
bool mIsAnimated;
bool mFirstWrite;
};
} // namespace image