r78652 added partially decoded images to the MemoryCache's list of live decoded resources so that they can be pruned on memory pressure. This was needed because CG decodes part of the image to determine its properties (e.g. size). On memory pressure, we call BitmapImage::destroyDecodedData() which clears the ImageSource and frees up this extra decoded data. However, we currently fail to remove such partially decoded images from the MemoryCache's list of live resources when pruning. This is because BitmapImage::destroyMetadataAndNotify() fails to take into account the decoded properties size when no frames have been cleared. We thus fail to detect a decoded size change and do not call CachedImage::decodedSizeChanged(). As a result, the CachedImage's decoded size is not reset to 0 and we don't remove it from live decoded resources.
Created attachment 253597 [details] Patch
Comment on attachment 253597 [details] Patch Clearing flags on attachment: 253597 Committed r184793: <http://trac.webkit.org/changeset/184793>
All reviewed patches have been landed. Closing bug.