BitmapImage::destroyDecodedDataIfNecessary() should only count frames with image data
Created attachment 279080 [details] Patch
Comment on attachment 279080 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279080&action=review Unofficial r=me > Source/WebCore/platform/graphics/BitmapImage.h:90 > + unsigned usedFrameBytes() const { return m_image ? m_frameBytes : 0; } Do we need to call it usedFrameBytes()? Should not it be just named frameBytes()? I think it supposed to return the bytes of the image stored in this frame. So if the image is nil the frameBytes should be zero.
(In reply to comment #2) > Comment on attachment 279080 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=279080&action=review > > Unofficial r=me > > > Source/WebCore/platform/graphics/BitmapImage.h:90 > > + unsigned usedFrameBytes() const { return m_image ? m_frameBytes : 0; } > > Do we need to call it usedFrameBytes()? Should not it be just named > frameBytes()? I think it supposed to return the bytes of the image stored in > this frame. So if the image is nil the frameBytes should be zero. I think it needs to be disambiguate from height*width*4 which we get from metadata. In reality, all callers but the one I changed check m_image too.
http://trac.webkit.org/changeset/201043