Fix a regression where the cache size overflows because of a double
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2007 02:00:25 +0000 (02:00 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2007 02:00:25 +0000 (02:00 +0000)
commit3a641964935857a8fd5210870acba4dc5947ef5d
tree2e3aa18889599cb61a31c1d283d8748f06710ce1
parent0c3830346808313ebfcc7479de6b02b5452ad10e
    Fix a regression where the cache size overflows because of a double
        subtraction per resource when they got removed from the cache.  Add an
        assert to adjustSize to detect this case in the future.

        Fix ImageSourceCG so that when we flush decoded data from our cache that
        we also flush it from the ImageSource.

        Reviewed by mjs

        * loader/Cache.cpp:
        (WebCore::Cache::adjustSize):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::~BitmapImage):
        (WebCore::BitmapImage::destroyDecodedData):
        * platform/graphics/Image.h:
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        (WebCore::ImageSource::destroyFrameAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/Cache.cpp
WebCore/platform/graphics/BitmapImage.cpp
WebCore/platform/graphics/Image.h
WebCore/platform/graphics/ImageSource.h
WebCore/platform/graphics/cg/ImageSourceCG.cpp