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

Issue 8390047: Fix identity hash code function to respect flag. (Closed)

Created:
9 years, 1 month ago by Michael Starzinger
Modified:
9 years, 1 month ago
Reviewers:
rossberg
CC:
v8-dev
Visibility:
Public.

Description

Fix identity hash code function to respect flag. The flag passed to JSObject::GetIdentityHash() was not respected so far and an indentity hash code was generated even when the flag requested not to do so. This could lead to a rare corner cases (for which a test case was added) where a GC request would have been dropped. R=rossberg@chromium.org TEST=cctest/test-dictionary Committed: http://code.google.com/p/v8/source/detail?r=9801

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments by Andreas Rossberg. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -9 lines) Patch
M src/objects.cc View 4 chunks +8 lines, -3 lines 0 comments Download
M test/cctest/test-dictionary.cc View 1 3 chunks +63 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
PTAL.
9 years, 1 month ago (2011-10-26 12:16:31 UTC) #1
rossberg
lgtm http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc File test/cctest/test-dictionary.cc (right): http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc#newcode79 test/cctest/test-dictionary.cc:79: CHECK_NE(key->GetIdentityHash(OMIT_CREATION), HEAP->undefined_value()); Why not check for isSmi? http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc#newcode87 ...
9 years, 1 month ago (2011-10-26 12:19:48 UTC) #2
Michael Starzinger
9 years, 1 month ago (2011-10-26 12:25:16 UTC) #3
Added new patch set. Landed.

http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc
File test/cctest/test-dictionary.cc (right):

http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc#...
test/cctest/test-dictionary.cc:79: CHECK_NE(key->GetIdentityHash(OMIT_CREATION),
HEAP->undefined_value());
On 2011/10/26 12:19:48, rossberg wrote:
> Why not check for isSmi?

Done.

http://codereview.chromium.org/8390047/diff/1/test/cctest/test-dictionary.cc#...
test/cctest/test-dictionary.cc:87: CHECK_NE(key->GetIdentityHash(OMIT_CREATION),
HEAP->undefined_value());
On 2011/10/26 12:19:48, rossberg wrote:
> Same here.

Done.

Powered by Google App Engine
This is Rietveld 408576698