Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index b15a5d2790a91ca54aa35553e9aa3525e93d20ed..ee77e2e8e32979f099987cfe848b9deea19a039d 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -4023,13 +4023,7 @@ AllocationResult Heap::AllocateSymbol() { |
result->set_map_no_write_barrier(symbol_map()); |
// Generate a random hash value. |
- int hash; |
- int attempts = 0; |
- do { |
- hash = isolate()->random_number_generator()->NextInt() & Name::kHashBitMask; |
- attempts++; |
- } while (hash == 0 && attempts < 30); |
- if (hash == 0) hash = 1; // never return 0 |
+ int hash = isolate()->GenerateIdentityHash(Name::kHashBitMask); |
Symbol::cast(result) |
->set_hash_field(Name::kIsNotArrayIndexMask | (hash << Name::kHashShift)); |