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

Issue 2272383002: [api] Add interceptor for defineProperty(). (Closed)

Created:
4 years, 3 months ago by Franzi
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@DefineProperty
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[api] Add interceptor for defineProperty(). With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls. Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal(). As without this patch, the query interceptor triggers on defineProperty, unless the definer callback intercepts the request. As without this patch, the query interceptor triggers on defineProperty, unless the definer callback intercepts the request. BUG= Committed: https://crrev.com/b9d985975cf3bab0ded0cec9fafd3799f9bde29a Committed: https://crrev.com/7c401bd84cbd71a0dcdce01031875a7b90471ffb Cr-Original-Commit-Position: refs/heads/master@{#39094} Cr-Commit-Position: refs/heads/master@{#39122}

Patch Set 1 #

Patch Set 2 : Fix bugs with enumerable/configurable and callable. #

Patch Set 3 : Add test for intercepting Object.freeze(). #

Total comments: 6

Patch Set 4 : Rename propDescriptor variable. #

Patch Set 5 : Fix getter and setter, they can be undefined. #

Patch Set 6 : Inline function. #

Patch Set 7 : Fix bug with IndexedDefinerCallback. #

Patch Set 8 : Cover enumerable/configurable in test. #

Patch Set 9 : Rebase, descriptor is now mutable. #

Patch Set 10 : Rebase. #

Patch Set 11 : Query descriptor triggers on defineProperty(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+677 lines, -21 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 8 9 6 chunks +65 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 5 chunks +16 lines, -18 lines 0 comments Download
M src/api-arguments.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/api-arguments-inl.h View 2 chunks +35 lines, -0 lines 0 comments Download
M src/counters.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +93 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api-interceptors.cc View 1 2 3 4 5 6 7 8 9 4 chunks +455 lines, -2 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 52 (39 generated)
Franzi
Hi Jochen, Here's the API addition that allows to define an interceptor for defineProperty(). Can ...
4 years, 3 months ago (2016-08-25 14:11:36 UTC) #11
jochen (gone - plz use gerrit)
api lgtm
4 years, 3 months ago (2016-08-25 14:23:17 UTC) #12
jochen (gone - plz use gerrit)
hum, you probably also want me to review the rest of the code, right? let ...
4 years, 3 months ago (2016-08-25 14:23:44 UTC) #13
jochen (gone - plz use gerrit)
(just publishing my drafts) the higher level feedback is that I think we should only ...
4 years, 3 months ago (2016-08-26 18:18:46 UTC) #14
Franzi
Hi Jochen, I rebased onto the simplified property descriptor. Can you have another look please? ...
4 years, 3 months ago (2016-09-01 06:38:18 UTC) #29
jochen (gone - plz use gerrit)
lgtm
4 years, 3 months ago (2016-09-01 14:54:37 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2272383002/160001
4 years, 3 months ago (2016-09-01 15:16:11 UTC) #32
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 3 months ago (2016-09-01 15:18:09 UTC) #34
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/b9d985975cf3bab0ded0cec9fafd3799f9bde29a Cr-Commit-Position: refs/heads/master@{#39094}
4 years, 3 months ago (2016-09-01 15:18:37 UTC) #36
Jakob Kummerow
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2303533004/ by jkummerow@chromium.org. ...
4 years, 3 months ago (2016-09-01 16:03:23 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2272383002/220001
4 years, 3 months ago (2016-09-02 09:06:35 UTC) #48
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 3 months ago (2016-09-02 09:08:36 UTC) #50
commit-bot: I haz the power
4 years, 3 months ago (2016-09-02 09:09:15 UTC) #52
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/7c401bd84cbd71a0dcdce01031875a7b90471ffb
Cr-Commit-Position: refs/heads/master@{#39122}

Powered by Google App Engine
This is Rietveld 408576698