Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 100147: Make Object::GetIdentityHash() never return 0.... (Closed)

Created:
11 years, 8 months ago by asargent_no_longer_on_chrome
Modified:
9 years, 7 months ago
Reviewers:
iposva, Dean McNamee
CC:
v8-dev
Visibility:
Public.

Description

Make Object::GetIdentityHash() never return 0. This is convenient when using identity hashes in data structures that want to reserve 0 as a sentinel value, such as WebKit's WTF::HashMap. Committed: http://code.google.com/p/v8/source/detail?r=1821

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M src/api.cc View 1 1 chunk +6 lines, -1 line 1 comment Download

Messages

Total messages: 3 (0 generated)
asargent_no_longer_on_chrome
11 years, 8 months ago (2009-04-29 01:50:39 UTC) #1
Dean McNamee
http://codereview.chromium.org/100147/diff/4/5 File src/api.cc (right): http://codereview.chromium.org/100147/diff/4/5#newcode2077 Line 2077: hash_value = random() & i::Smi::kMaxValue; // Limit range ...
11 years, 7 months ago (2009-04-29 09:14:52 UTC) #2
asargent_no_longer_on_chrome
11 years, 7 months ago (2009-04-29 16:47:13 UTC) #3
On 2009/04/29 09:14:52, Dean McNamee wrote:
> Just to be annoying, we probably shouldn't be using random() (it's not thread
> safe, etc).

Do you have a suggestion on what we should use instead? (Know of a good open
source & license-compatible replacement?)

Powered by Google App Engine
This is Rietveld 408576698