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

Issue 9021019: Fix JavaScript accessors on objects with interceptors. (Closed)

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

Description

Fix JavaScript accessors on objects with interceptors. This fixes how Object.defineProperty() defines JavaScript accessors on objects with installed API interceptors. The definition itself does not cause any interceptors to be called, whereas any subsequent accesses on said object will still fire the interceptor. This behavior is in sync with API accessors. R=rossberg@chromium.org BUG=v8:1651, chromium:94666 TEST=cctest/test-api Committed: http://code.google.com/p/v8/source/detail?r=10293

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 (+84 lines, -2 lines) Patch
M src/objects.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 3 chunks +83 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
9 years ago (2011-12-21 15:46:14 UTC) #1
rossberg
lgtm http://codereview.chromium.org/9021019/diff/1/test/cctest/test-api.cc File test/cctest/test-api.cc (right): http://codereview.chromium.org/9021019/diff/1/test/cctest/test-api.cc#newcode1443 test/cctest/test-api.cc:1443: THREADED_TEST(SwitchFromAccessorToInterceptor) { Not your change, but could you ...
9 years ago (2011-12-21 15:58:41 UTC) #2
Michael Starzinger
9 years ago (2011-12-21 16:15:01 UTC) #3
Added new patch set. Landed.

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

http://codereview.chromium.org/9021019/diff/1/test/cctest/test-api.cc#newcode...
test/cctest/test-api.cc:1443: THREADED_TEST(SwitchFromAccessorToInterceptor) {
On 2011/12/21 15:58:42, rossberg wrote:
> Not your change, but could you add a variant of this test not using
inheritance,
> analogous to your new one below?

Done.

http://codereview.chromium.org/9021019/diff/1/test/cctest/test-api.cc#newcode...
test/cctest/test-api.cc:1464: Handle<FunctionTemplate> child =
FunctionTemplate::New();
On 2011/12/21 15:58:42, rossberg wrote:
> "child"? Where is the parent? ;)

Done. Renamed to "obj" instead.

Powered by Google App Engine
This is Rietveld 408576698