summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 15:47:51 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 15:47:51 +0000
commit7121fbadd407d4c495429eac82ee538501e22e70 (patch)
tree62dad8aa2d3ac9a20a381936f5022f418da2444e /webkit/port
parent18996fdff00837dc684f5ad010dc5ef4a3d30276 (diff)
downloadchromium_src-7121fbadd407d4c495429eac82ee538501e22e70.zip
chromium_src-7121fbadd407d4c495429eac82ee538501e22e70.tar.gz
chromium_src-7121fbadd407d4c495429eac82ee538501e22e70.tar.bz2
These two layout tests were failing:
LayoutTests/svg/dom/animated-tearoff-equality.xhtml LayoutTests/svg/dom/animated-tearoff-lifespan.xhtml in Release only. The cause was the use of an invalid hash function. Review URL: http://codereview.chromium.org/42094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/v8/V8SVGPODTypeWrapper.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h b/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h
index 55e9ee1..79553c2 100644
--- a/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h
+++ b/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h
@@ -262,7 +262,10 @@ template<typename PODType, typename PODTypeCreator>
struct PODTypeWrapperCacheInfoHash {
static unsigned hash(const PODTypeWrapperCacheInfo<PODType, PODTypeCreator>& info)
{
- return StringImpl::computeHash((::UChar*) &info, sizeof(PODTypeWrapperCacheInfo<PODType, PODTypeCreator>) / sizeof(::UChar));
+ unsigned creator = reinterpret_cast<unsigned>(info.creator);
+ unsigned getter = reinterpret_cast<unsigned>(*(void**)&info.getter);
+ unsigned setter = reinterpret_cast<unsigned>(*(void**)&info.setter);
+ return (creator * 13) + getter ^ (setter >> 2);
}
static bool equal(const PODTypeWrapperCacheInfo<PODType, PODTypeCreator>& a, const PODTypeWrapperCacheInfo<PODType, PODTypeCreator>& b)