mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1096913: Remove the simple cache entry when replacing the cache entry. r=mwu
This solves the issue since *mRequest may be different for the replacing entry, causing the simple cache entry never to be removed from NotifyExpired or replaced. And the simple cache to grow indefinitely.
This commit is contained in:
parent
93ec577355
commit
50868f204d
@ -250,6 +250,7 @@ CanvasImageCache::NotifyDrawImage(Element* aImage,
|
||||
// We are overwriting an existing entry.
|
||||
gImageCache->mTotal -= entry->mData->SizeInBytes();
|
||||
gImageCache->RemoveObject(entry->mData);
|
||||
gImageCache->mSimpleCache.RemoveEntry(*entry->mData->mRequest);
|
||||
}
|
||||
gImageCache->AddObject(entry->mData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user