Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 1540) |
+++ src/objects-inl.h (working copy) |
@@ -2444,10 +2444,15 @@ |
uint32_t StringHasher::GetHash() { |
+ // Get the calculated raw hash value and do some more bit ops to distribute |
+ // the hash further. Ensure that we never return zero as the hash value. |
uint32_t result = raw_running_hash_; |
result += (result << 3); |
result ^= (result >> 11); |
result += (result << 15); |
+ if (result == 0) { |
+ result = 27; |
+ } |
return result; |
} |