Changeset 76474 in webkit
- Timestamp:
- Jan 23, 2011 5:00:57 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r76471 r76474 1 2011-01-23 Patrick Gansterer <paroga@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Use WTF::StringHasher in WebCore 6 https://bugs.webkit.org/show_bug.cgi?id=52934 7 8 Add an additional function to calculate the hash 9 of data with a runtimedependent size. 10 11 * wtf/StringHasher.h: 12 (WTF::StringHasher::createBlobHash): 13 1 14 2011-01-23 Patrick Gansterer <paroga@webkit.org> 2 15 -
trunk/Source/JavaScriptCore/wtf/StringHasher.h
r69912 r76474 142 142 } 143 143 144 static inline unsigned createBlobHash(const void* data, unsigned size) 145 { 146 ASSERT(!(size % 2)); 147 return createHash<UChar>(static_cast<const UChar*>(data), size / sizeof(UChar)); 148 } 149 144 150 private: 145 151 static inline UChar defaultCoverter(UChar ch) -
trunk/Source/WebCore/ChangeLog
r76472 r76474 1 2011-01-23 Patrick Gansterer <paroga@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Use WTF::StringHasher in WebCore 6 https://bugs.webkit.org/show_bug.cgi?id=52934 7 8 * loader/appcache/ApplicationCacheStorage.cpp: 9 (WebCore::urlHostHash): 10 * platform/LinkHash.cpp: 11 (WebCore::visitedLinkHashInline): 12 * platform/cf/BinaryPropertyList.cpp: 13 (WebCore::IntegerArrayHash::hash): 14 * platform/graphics/wx/FontPlatformDataWx.cpp: 15 (WebCore::FontPlatformData::computeHash): 16 * platform/network/ProtectionSpaceHash.h: 17 (WebCore::ProtectionSpaceHash::hash): 18 1 19 2011-01-23 Patrick Gansterer <paroga@webkit.org> 2 20 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
r69048 r76474 90 90 unsigned hostEnd = url.hostEnd(); 91 91 92 return AlreadyHashed::avoidDeletedValue( StringImpl::computeHash(url.string().characters() + hostStart, hostEnd - hostStart));92 return AlreadyHashed::avoidDeletedValue(WTF::StringHasher::createHash(url.string().characters() + hostStart, hostEnd - hostStart)); 93 93 } 94 94 -
trunk/Source/WebCore/platform/LinkHash.cpp
r67496 r76474 198 198 static ALWAYS_INLINE LinkHash visitedLinkHashInline(const UChar* url, unsigned length) 199 199 { 200 return AlreadyHashed::avoidDeletedValue( StringImpl::computeHash(url, length));200 return AlreadyHashed::avoidDeletedValue(WTF::StringHasher::createHash(url, length)); 201 201 } 202 202 -
trunk/Source/WebCore/platform/cf/BinaryPropertyList.cpp
r65077 r76474 93 93 unsigned IntegerArrayHash::hash(const IntegerArray& array) 94 94 { 95 return StringImpl::computeHash(reinterpret_cast<const UChar*>(array.integers()), array.size() / (sizeof(int) / sizeof(UChar)));95 return WTF::StringHasher::createBlobHash(array.integers(), array.size()); 96 96 } 97 97 -
trunk/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
r70705 r76474 127 127 thisFont->GetWeight(), 128 128 thisFont->GetUnderlined(), 129 StringImpl::computeHash(thisFont->GetFaceName().utf8_str())129 WTF::StringHasher::createHash(thisFont->GetFaceName().utf8_str()) 130 130 }; 131 131 -
trunk/Source/WebCore/platform/network/ProtectionSpaceHash.h
r54028 r76474 43 43 }; 44 44 45 unsigned codeCount = sizeof(hashCodes) / sizeof(UChar);45 unsigned codeCount = sizeof(hashCodes); 46 46 // Ignore realm for proxies. 47 47 if (protectionSpace.isProxy()) 48 codeCount -= sizeof(hashCodes[0]) / sizeof(UChar);49 return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), codeCount);48 codeCount -= sizeof(hashCodes[0]); 49 return WTF::StringHasher::createBlobHash(hashCodes, codeCount); 50 50 } 51 51
Note: See TracChangeset
for help on using the changeset viewer.