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

Issue 2176113009: [keys] Trigger [[getOwnPropertyDescriptor]] trap for Object.keys (Closed)

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

Description

[keys] Trigger [[getOwnPropertyDescriptor]] trap on proxies for Object.keys This CL fixes a long-standing bug with Object.keys where the enumerability check was omitted if the [ownKeys] trap is not present. The only distinction the KeyAccumulator needs is whether it collects keys for for-in (is_for_in_) or not. ForInFilter performs a separate step to filter out non-enumerable keys later-on while in all the other use-cases we have to filter keys. BUG=v8:1543, v8:5250 Committed: https://crrev.com/f4f06c50298b275b531e510f7521df48778c2b0a Cr-Commit-Position: refs/heads/master@{#38199}

Patch Set 1 #

Total comments: 5

Patch Set 2 : addressing comments #

Patch Set 3 : cleaning up test #

Total comments: 1

Patch Set 4 : fixing comments #

Patch Set 5 : rebasing #

Patch Set 6 : eval scoping is hard #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -51 lines) Patch
M src/keys.h View 5 chunks +1 line, -5 lines 0 comments Download
M src/keys.cc View 1 4 chunks +9 lines, -15 lines 0 comments Download
M src/runtime/runtime-forin.cc View 1 chunk +0 lines, -1 line 0 comments Download
M test/mjsunit/es6/proxies-keys.js View 1 2 3 4 5 1 chunk +35 lines, -30 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
Camillo Bruni
PTAL while investigating a possible backmerge for chromium:632305 I stumbled upon this minor hiccup.
4 years, 4 months ago (2016-07-28 16:34:37 UTC) #2
caitp
Not an expert on the key accumulator, but the simplification looks nice. https://codereview.chromium.org/2176113009/diff/1/test/mjsunit/es6/proxies-keys.js File test/mjsunit/es6/proxies-keys.js ...
4 years, 4 months ago (2016-07-28 17:41:59 UTC) #3
adamk
https://codereview.chromium.org/2176113009/diff/1/src/keys.cc File src/keys.cc (right): https://codereview.chromium.org/2176113009/diff/1/src/keys.cc#newcode139 src/keys.cc:139: DCHECK(!is_for_in_); I think this DCHECK can safely die now ...
4 years, 4 months ago (2016-07-28 18:03:13 UTC) #5
Camillo Bruni
added some more description. https://codereview.chromium.org/2176113009/diff/1/src/keys.cc File src/keys.cc (right): https://codereview.chromium.org/2176113009/diff/1/src/keys.cc#newcode139 src/keys.cc:139: DCHECK(!is_for_in_); On 2016/07/28 at 18:03:13, ...
4 years, 4 months ago (2016-07-29 08:31:07 UTC) #7
adamk
lgtm % comment https://codereview.chromium.org/2176113009/diff/40001/test/mjsunit/es6/proxies-keys.js File test/mjsunit/es6/proxies-keys.js (right): https://codereview.chromium.org/2176113009/diff/40001/test/mjsunit/es6/proxies-keys.js#newcode37 test/mjsunit/es6/proxies-keys.js:37: // Fall through to target if ...
4 years, 4 months ago (2016-07-29 21:09:30 UTC) #8
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/2176113009/60001
4 years, 4 months ago (2016-08-01 08:30:57 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_mac_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel_ng/builds/5987) v8_mac_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 4 months ago (2016-08-01 08:47:54 UTC) #14
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/2176113009/100001
4 years, 4 months ago (2016-08-01 09:44:24 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-01 10:08:59 UTC) #20
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 10:11:03 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f4f06c50298b275b531e510f7521df48778c2b0a
Cr-Commit-Position: refs/heads/master@{#38199}

Powered by Google App Engine
This is Rietveld 408576698