2011-05-25 James Robinson <jamesr@chromium.org>
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2011 01:07:57 +0000 (01:07 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2011 01:07:57 +0000 (01:07 +0000)
commit83ea3ae79fc89e58a3eee2855680fc478e338f2e
tree39a7517cfb850a045f39dc8f3cdd7881ea039191
parent4872d09740cc73770c370a54fbd0df3bcc5c7ab5
2011-05-25  James Robinson  <jamesr@chromium.org>

        Reviewed by Geoffrey Garen

        CachedResource overhead size calculation ignores the actual size of the URL
        https://bugs.webkit.org/show_bug.cgi?id=61481

        CachedResource::overheadSize is used to determine the size of an entry in the memory cache to know when to evict
        it.  When the resource is a large data: URL, for example representing image or audio data, the URL size itself
        can be significant.

        This patch uses an estimate of actual number of bytes used by the URL that is valid for ASCII urls and close for
        other types of strings instead of a fixed number.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::overheadSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedResource.cpp