Index: src/api.cc |
=================================================================== |
--- src/api.cc (revision 2155) |
+++ src/api.cc (working copy) |
@@ -2124,7 +2124,9 @@ |
} else { |
int attempts = 0; |
do { |
- hash_value = random() & i::Smi::kMaxValue; // Limit range to fit a smi. |
+ // Generate a random 32-bit hash value but limit range to fit |
+ // within a smi. |
+ hash_value = i::V8::Random() & i::Smi::kMaxValue; |
attempts++; |
} while (hash_value == 0 && attempts < 30); |
hash_value = hash_value != 0 ? hash_value : 1; // never return 0 |