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

Issue 2311873002: [api] Add interceptor for getOwnPropertyDescriptor(). (Closed)

Created:
4 years, 3 months ago by Franzi
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[api] Add interceptor for getOwnPropertyDescriptor(). The existing PropertyQueryCallback intercepts getOwnPropertyDescriptor, but it returns only value and attributes, not the accessors. This PropertyDescriptorCallback returns a descriptor similar to Ecma-262 6.2.4. You can either set a PropertyQueryCallback or a PropertyDescriptorCallback, but not both. When you set a callback for DefineProperty(), you can set a PropertyDescriptorCallback but not a PropertyQueryCallback. BUG=v8:5359 Committed: https://crrev.com/b0a7738a5feb75d23a9707393d102cc34814fbf7 Cr-Commit-Position: refs/heads/master@{#39279}

Patch Set 1 #

Patch Set 2 : Improve comments. #

Patch Set 3 : Do not restart iterator. #

Patch Set 4 : Add test for invalid descriptor. #

Patch Set 5 : Rename and comments. #

Total comments: 4

Patch Set 6 : Address review comments. #

Patch Set 7 : Crash instead of exception on invalid descriptor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -32 lines) Patch
M include/v8.h View 1 2 3 4 5 8 chunks +36 lines, -4 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 chunks +29 lines, -21 lines 0 comments Download
M src/counters.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 3 chunks +4 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 2 chunks +58 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api-interceptors.cc View 1 2 3 4 5 6 5 chunks +142 lines, -5 lines 0 comments Download

Messages

Total messages: 35 (25 generated)
Franzi
Hi Jochen, Here's the last API change needed to fix the Node.js contextify issues. This ...
4 years, 3 months ago (2016-09-06 10:47:22 UTC) #19
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2311873002/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2311873002/diff/80001/src/objects.cc#newcode7360 src/objects.cc:7360: Handle<Object> receiver = it->GetReceiver(); all our API methods are ...
4 years, 3 months ago (2016-09-06 16:02:34 UTC) #20
Franzi
https://codereview.chromium.org/2311873002/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2311873002/diff/80001/src/objects.cc#newcode7360 src/objects.cc:7360: Handle<Object> receiver = it->GetReceiver(); On 2016/09/06 16:02:34, jochen wrote: ...
4 years, 3 months ago (2016-09-06 16:45:37 UTC) #21
jochen (gone - plz use gerrit)
I wonder whether we should throw an exception or just crash if an interceptor returns ...
4 years, 3 months ago (2016-09-07 14:22:29 UTC) #22
jochen (gone - plz use gerrit)
please also reference the tracking bug from the cl description
4 years, 3 months ago (2016-09-07 14:22:45 UTC) #23
Franzi
On 2016/09/07 at 14:22:45, jochen wrote: > please also reference the tracking bug from the ...
4 years, 3 months ago (2016-09-07 19:03:47 UTC) #29
jochen (gone - plz use gerrit)
lgtm
4 years, 3 months ago (2016-09-08 12:46:32 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/2311873002/120001
4 years, 3 months ago (2016-09-08 12:49:23 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-09-08 12:51:43 UTC) #33
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 12:51:54 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b0a7738a5feb75d23a9707393d102cc34814fbf7
Cr-Commit-Position: refs/heads/master@{#39279}

Powered by Google App Engine
This is Rietveld 408576698