mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 857876 - If we're not storing source data, explicitly shut down the decoder when the image data is complete. r=seth
This commit is contained in:
parent
9205e033e1
commit
657125683f
@ -1759,6 +1759,13 @@ RasterImage::DoImageDataComplete()
|
||||
{
|
||||
MutexAutoLock lock(mDecodingMutex);
|
||||
|
||||
// If we're not storing any source data, then there's nothing more we can do
|
||||
// once we've tried decoding for size.
|
||||
if (!StoringSourceData() && mDecoder) {
|
||||
nsresult rv = ShutdownDecoder(eShutdownIntent_Done);
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
}
|
||||
|
||||
// If DecodeUntilSizeAvailable didn't finish the decode, let the decode worker
|
||||
// finish decoding this image.
|
||||
if (mDecoder) {
|
||||
@ -2596,6 +2603,7 @@ nsresult
|
||||
RasterImage::ShutdownDecoder(eShutdownIntent aIntent)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mDecodingMutex.AssertCurrentThreadOwns();
|
||||
|
||||
// Ensure that our intent is valid
|
||||
NS_ABORT_IF_FALSE((aIntent >= 0) && (aIntent < eShutdownIntent_AllCount),
|
||||
|
Loading…
Reference in New Issue
Block a user