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

Issue 467013003: Add interceptor support for symbols (Closed)

Created:
6 years, 4 months ago by wingo
Modified:
6 years ago
Reviewers:
dcarney, rossberg
CC:
v8-dev, Paweł Hajdan Jr.
Project:
v8
Visibility:
Public.

Description

Add interceptor support for symbols ObjectTemplate::SetGenericNamedPropertyHandler is a new version of ObjectTemplate::SetNamedPropertyHandler that can intercept any Name property access, not just access to String properties. Eventually we will deprecate and remove ObjectTemplate::SetNamedPropertyHandler, then rename ObjectTemplate::SetGenericNamedPropertyHandler back to ObjectTemplate::SetNamedPropertyHandler. R=dcarney@chromium.org, rossberg@chromium.org BUG=v8:3394 LOG=Y

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix nits, update test suite #

Total comments: 3

Patch Set 3 : Updated to filter out non-symbol keys from for-in enumeration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -162 lines) Patch
M include/v8.h View 1 2 3 chunks +59 lines, -0 lines 0 comments Download
M samples/process.cc View 1 3 chunks +10 lines, -6 lines 0 comments Download
M src/api.cc View 1 2 4 chunks +41 lines, -10 lines 0 comments Download
M src/arguments.h View 2 chunks +8 lines, -8 lines 0 comments Download
M src/elements.h View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/elements.cc View 1 2 3 chunks +10 lines, -1 line 0 comments Download
M src/ic/ic.cc View 1 2 1 chunk +4 lines, -6 lines 0 comments Download
M src/objects.h View 1 2 3 chunks +14 lines, -3 lines 0 comments Download
M src/objects.cc View 1 2 10 chunks +46 lines, -44 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M test/cctest/test-accessors.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 54 chunks +216 lines, -66 lines 0 comments Download
M test/cctest/test-debug.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M test/cctest/test-decls.cc View 1 6 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
wingo
A compatible change to add interceptor support for symbols in the API and the runtime. ...
6 years, 4 months ago (2014-08-13 08:07:59 UTC) #1
wingo
I should mention that this change isn't blocking me on anything; just a random thing ...
6 years, 4 months ago (2014-08-13 08:14:26 UTC) #2
dcarney
lgtm normally when we do this, we convert all the cctest files to use the ...
6 years, 4 months ago (2014-08-13 08:25:40 UTC) #3
wingo
Updated patch to make requested changes, with test suite update. PTAL at the one breaking ...
6 years, 4 months ago (2014-08-13 10:45:40 UTC) #4
dcarney
lgtm https://codereview.chromium.org/467013003/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/467013003/diff/1/include/v8.h#newcode3730 include/v8.h:3730: void SetGenericNamedPropertyHandler( On 2014/08/13 10:45:39, wingo wrote: > ...
6 years, 4 months ago (2014-08-13 11:19:56 UTC) #5
rossberg
NOT LGTM https://codereview.chromium.org/467013003/diff/40001/src/objects.cc File src/objects.cc (left): https://codereview.chromium.org/467013003/diff/40001/src/objects.cc#oldcode13612 src/objects.cc:13612: // TODO(rossberg): support symbols in API, and ...
6 years, 4 months ago (2014-08-19 11:36:38 UTC) #6
wingo
https://codereview.chromium.org/467013003/diff/40001/src/objects.cc File src/objects.cc (left): https://codereview.chromium.org/467013003/diff/40001/src/objects.cc#oldcode13612 src/objects.cc:13612: // TODO(rossberg): support symbols in API, and filter here ...
6 years, 4 months ago (2014-08-21 09:55:32 UTC) #7
rossberg
On 2014/08/21 09:55:32, wingo wrote: > https://codereview.chromium.org/467013003/diff/40001/src/objects.cc > File src/objects.cc (left): > > https://codereview.chromium.org/467013003/diff/40001/src/objects.cc#oldcode13612 > ...
6 years, 4 months ago (2014-08-21 11:25:09 UTC) #8
wingo
On 2014/08/21 11:25:09, rossberg wrote: > Would it be better to > add > > ...
6 years, 4 months ago (2014-08-21 11:50:31 UTC) #9
rossberg
On 2014/08/21 11:50:31, wingo wrote: > On 2014/08/21 11:25:09, rossberg wrote: > > Would it ...
6 years, 4 months ago (2014-08-21 12:07:48 UTC) #10
wingo
On 2014/08/21 12:07:48, rossberg wrote: > Hm, I'm not sure. It seems to me that ...
6 years, 4 months ago (2014-08-21 13:08:29 UTC) #11
wingo
I changed the GetKeys implementation to filter out non-symbol keys; PTAL andreas. Unfortunately I rebased ...
6 years, 3 months ago (2014-08-26 10:51:01 UTC) #12
dcarney
rossberg@ : what would you think of passing a struct containing all the callbacks to ...
6 years, 3 months ago (2014-08-27 09:57:37 UTC) #13
rossberg
On 2014/08/27 09:57:37, dcarney (ooto) wrote: > rossberg@ : what would you think of passing ...
6 years, 3 months ago (2014-08-27 10:42:31 UTC) #14
wingo
On 2014/08/27 10:42:31, rossberg wrote: > On 2014/08/27 09:57:37, dcarney (ooto) wrote: > > rossberg@ ...
6 years, 3 months ago (2014-08-27 12:13:56 UTC) #15
dcarney
> Agreed wrt a struct making sense, but isn't it reasonable to also have an ...
6 years, 3 months ago (2014-08-27 13:17:29 UTC) #16
rossberg
lgtm
6 years, 3 months ago (2014-08-27 17:35:09 UTC) #17
wingo
On 2014/08/27 17:35:09, rossberg wrote: > lgtm I'm going to be OOO for a week, ...
6 years, 3 months ago (2014-09-02 19:26:26 UTC) #18
wingo
On 2014/09/02 19:26:26, wingo (holiday until 11 sep) wrote: > On 2014/08/27 17:35:09, rossberg wrote: ...
6 years, 3 months ago (2014-09-02 19:53:45 UTC) #19
dcarney
6 years ago (2014-11-26 14:55:02 UTC) #20
On 2014/09/02 19:53:45, wingo wrote:
> On 2014/09/02 19:26:26, wingo (holiday until 11 sep) wrote:
> > On 2014/08/27 17:35:09, rossberg wrote:
> > > lgtm
> > 
> > I'm going to be OOO for a week, and figured that it's best to get this in
then
> > make the struct API change when I get back, if it's not done already.  That
> > should be much less intrusive.  Will land.
> 
> Alack, a simple rebase-and-fixup results in non-passing tests.  Punting for
now.

fyi - reviving this cl here as I need to make a bunch of interceptor change in
blink:  https://codereview.chromium.org/760883002/

Powered by Google App Engine
This is Rietveld 408576698