http://codereview.chromium.org/7349005/diff/1/src/objects-inl.h
File src/objects-inl.h (right):

http://codereview.chromium.org/7349005/diff/1/src/objects-inl.h#newcode4313
src/objects-inl.h:4313: if (maybe_hash->IsFailure()) return 0;
If we are trying to put an object to a dictionary and GC is required to
create it's hash then we'll put object into a dictionary as if it has 0
hash. Later when will search for an object we might successfully create
hash (!= 0) and will not find an object that we put with hash == 0.

I recommend creating utility methods in ObjectDictionary that first
guarantee that key has a hash (or return failure) and then delegate to
Dictionary methods. Here you should assert that hash was assigned to the
key.

http://codereview.chromium.org/7349005/diff/1/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/7349005/diff/1/src/objects.cc#newcode2969
src/objects.cc:2969: CHECK(!result->IsFailure());
I think it can return a failure (adding local property might require an
allocation).

Please use

if (result->IsFailure()) return result;

instead.

http://codereview.chromium.org/7349005/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to