Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index f6a1b3551ba57a59cfcd4bdc6e102650379f4af2..ac92f07a829785c384ae3faeb4d33073b855d5a5 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -4014,13 +4014,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)); |