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

Issue 40324: Allow hidden properties and implement GetIdentityHash (Closed)

Created:
11 years, 9 months ago by iposva
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

- Allow hidden properties to be set on any JSObject through the V8 C++ API. - Use the hidden properties to expose a IdentityHash accessor. Implementation detail: Currently the hidden properties are accessed through a named, but not enumerable property on the JSObject. I am planning to submit this now so that work on tying this new API into the Chromium V8 bindings can proceed while I hide the properties entirely.

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -1 line) Patch
M include/v8.h View 1 1 chunk +14 lines, -0 lines 0 comments Download
M src/api.cc View 1 1 chunk +68 lines, -0 lines 0 comments Download
M src/handles.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/handles.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/heap.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/objects.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
iposva
Kasper, Mads, Please take a look at this initial implementation. Mike, Would this solve some ...
11 years, 9 months ago (2009-03-10 00:07:52 UTC) #1
Kasper Lund
LGTM. My only real concern is the timing of the commit; I'd prefer not to ...
11 years, 9 months ago (2009-03-10 06:31:06 UTC) #2
Mads Ager (chromium)
11 years, 9 months ago (2009-03-10 08:23:39 UTC) #3
Overall, this looks good.  I agree with Kasper on the timing.  We need to get
the new compiler pushed to trunk before landing this in bleeding_edge.  Once we
land this in bleeding_edge, we need to make sure that the real hiding of the
property happens fairly quickly so we are not blocked from pushing bleeding_edge
to trunk.

http://codereview.chromium.org/40324/diff/1/3
File include/v8.h (right):

http://codereview.chromium.org/40324/diff/1/3#newcode1077
Line 1077: int GetIdentityHash();
Having two ways of creating a named hidden value makes naming conflicts
possible.  When we get to the point where the hidden properties are actually
hidden, we should specify that the name used for the hash is reserved
(alternatively, we could remove GetIdentityHash and let the embedder do it
himself with the API below).

Powered by Google App Engine
This is Rietveld 408576698