Reviewed by Brady.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Mar 2008 20:39:21 +0000 (20:39 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Mar 2008 20:39:21 +0000 (20:39 +0000)
commit512c99cdfcdc4b95555bc5ac1a867c31043581b7
tree26581e60972bf6a72949bae4d016c43457090db9
parent60ba5b6a81628c2112dac8b3002c2b5e153ac96d
    Reviewed by Brady.

        - fix a theoretical problem with the visited-link hash table by avoiding collision
          with the special "deleted" value
        - improve efficiency of with the visited-link hash table by not hashing twice

        * page/PageGroup.cpp:
        (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
        value, since the hash table uses that for deleted hash table entries.
        (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
        value with the HashSet.
        (WebCore::PageGroup::addVisitedLink): Ditto.

        * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
        values. This assumes that the value is already a hash value, and doesn't try to
        hash it again. Used this for m_visitedLinkHashes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/PageGroup.cpp
WebCore/page/PageGroup.h