Bug 802168 - Don't shut down the decoder when we're destroying RasterImages; instead, just remove ourselves from the decoding list. r=jrmuizel,jdm

This commit is contained in:
Joe Drew 2012-10-22 13:16:57 -04:00
Родитель a0da541bb0
Коммит 9d1e0f23ac
2 изменённых файлов: 4 добавлений и 5 удалений

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

@ -29,7 +29,6 @@ Decoder::Decoder(RasterImage &aImage, imgIDecoderObserver* aObserver)
Decoder::~Decoder()
{
NS_WARN_IF_FALSE(!mInFrame, "Shutting down decoder mid-frame!");
mInitialized = false;
}

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

@ -399,11 +399,11 @@ RasterImage::~RasterImage()
DiscardTracker::Remove(&mDiscardTrackerNode);
}
// If we have a decoder open, shut it down
if (mDecoder) {
nsresult rv = ShutdownDecoder(eShutdownIntent_Interrupted);
if (NS_FAILED(rv))
NS_WARNING("Failed to shut down decoder in destructor!");
// Kill off our decode request, if it's pending. (If not, this call is
// harmless.)
DecodeWorker::Singleton()->StopDecoding(this);
mDecoder = nullptr;
}
delete mAnim;