зеркало из https://github.com/mozilla/gecko-dev.git
Bug 820602 - Remove change to decoder notification behavior that causes AWSY leak. r=joe
This commit is contained in:
Родитель
d4170e5094
Коммит
02254bb9cf
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче