Bug 802144 - Don't delete memory used for image frames while the decoder could still try to use it. r=joe

This commit is contained in:
Josh Matthews 2012-10-16 22:45:14 -04:00
Родитель b2195953fb
Коммит 348f30fb12
1 изменённых файлов: 5 добавлений и 6 удалений

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

@ -252,12 +252,6 @@ RasterImage::~RasterImage()
{
ScaleRequest::Stop(mScaleRequest.image);
delete mAnim;
for (unsigned int i = 0; i < mFrames.Length(); ++i)
delete mFrames[i];
mFrames.Clear();
// Discardable statistics
if (mDiscardable) {
num_discardable_containers--;
@ -282,6 +276,11 @@ RasterImage::~RasterImage()
NS_WARNING("Failed to shut down decoder in destructor!");
}
delete mAnim;
for (unsigned int i = 0; i < mFrames.Length(); ++i)
delete mFrames[i];
// Total statistics
num_containers--;
total_source_bytes -= mSourceData.Length();