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

Issue 1748923003: [proxies] use [[GetPrototypeOf]] trap in for-in (Closed)

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

Description

[proxies] use [[GetPrototypeOf]] trap in for-in key accumulation With the recent spec change removing the [[Enumerate]] internal method, we now have to walk the complete prototype chain. This implies that we call the [[GetPrototypeOf]] trap on proxies. As a secondary change we now trigger the [[GetOwnProperty]] trap for the for-in filter step to see whether the properties are still enumerable. Before we did this in the key-accumulation phase. This way we slightly reduce the number of traps invoked. Whilst this is not ideal, it comes closer to the Spec's example implementation. BUG=v8:1543, v8:4768 LOG=n Committed: https://crrev.com/2efc1381313248352630b05f6d48064badfe7671 Cr-Commit-Position: refs/heads/master@{#35017}

Patch Set 1 #

Total comments: 6

Patch Set 2 : making georg happy #

Patch Set 3 : removing test test #

Patch Set 4 : use the results of AdvanceFollowingProxies #

Patch Set 5 : implementing recusing for-in has-enumerable-property lookup #

Patch Set 6 : implementing alternative lookup #

Patch Set 7 : adding comment #

Patch Set 8 : fixing tests #

Patch Set 9 : do not create a HandleScope when passing LookuptIterator* #

Total comments: 12

Patch Set 10 : adding comment #

Patch Set 11 : merge with master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -67 lines) Patch
M src/keys.h View 1 2 3 4 5 4 chunks +4 lines, -0 lines 0 comments Download
M src/keys.cc View 1 2 3 4 5 2 chunks +7 lines, -4 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +23 lines, -9 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M src/prototype.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download
M src/runtime/runtime-forin.cc View 1 2 3 4 5 6 7 2 chunks +60 lines, -17 lines 0 comments Download
M test/mjsunit/es6/proxies-for.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +86 lines, -6 lines 0 comments Download
M test/mjsunit/for-in-opt.js View 1 2 3 4 5 6 7 8 9 10 7 chunks +17 lines, -28 lines 0 comments Download

Messages

Total messages: 48 (21 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/1
4 years, 9 months ago (2016-03-01 12:48:46 UTC) #2
Camillo Bruni
PTAL
4 years, 9 months ago (2016-03-01 12:49:07 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/16279)
4 years, 9 months ago (2016-03-01 13:08:23 UTC) #6
neis
Hi Camillo, besides what we discussed offline, I think we should have more tests about ...
4 years, 9 months ago (2016-03-01 13:40:31 UTC) #7
Camillo Bruni
I think we have a bigger issue at hand. With the new spec change, it ...
4 years, 9 months ago (2016-03-01 19:04:58 UTC) #8
Dan Ehrenberg
On 2016/03/01 at 19:04:58, cbruni wrote: > I think we have a bigger issue at ...
4 years, 9 months ago (2016-03-01 19:35:22 UTC) #9
Camillo Bruni
On 2016/03/01 at 19:35:22, littledan wrote: > > The new spec is actually really vague. ...
4 years, 9 months ago (2016-03-01 20:58:16 UTC) #10
Dan Ehrenberg
On 2016/03/01 at 20:58:16, cbruni wrote: > On 2016/03/01 at 19:35:22, littledan wrote: > > ...
4 years, 9 months ago (2016-03-01 23:53:01 UTC) #11
rossberg
+1 to what Dan said. We intentionally asked to make the specification vague enough to ...
4 years, 9 months ago (2016-03-02 14:29:14 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/80001
4 years, 9 months ago (2016-03-04 09:29:36 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/11069)
4 years, 9 months ago (2016-03-04 09:46:24 UTC) #16
Camillo Bruni
4 years, 9 months ago (2016-03-16 11:50:20 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/120001
4 years, 9 months ago (2016-03-16 13:06:06 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/11705) v8_linux64_rel_ng on ...
4 years, 9 months ago (2016-03-16 13:08:57 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/140001
4 years, 9 months ago (2016-03-16 15:45:46 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel_ng/builds/3024) v8_linux64_rel_ng_triggered on ...
4 years, 9 months ago (2016-03-16 16:08:12 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/160001
4 years, 9 months ago (2016-03-17 20:24:54 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-17 20:48:53 UTC) #32
Camillo Bruni
PTAL again... what a struggle
4 years, 9 months ago (2016-03-17 21:12:05 UTC) #33
Jakob Kummerow
LGTM, just nits. https://codereview.chromium.org/1748923003/diff/160001/src/keys.h File src/keys.h (right): https://codereview.chromium.org/1748923003/diff/160001/src/keys.h#newcode92 src/keys.h:92: // prototype chain and forwords the ...
4 years, 9 months ago (2016-03-18 14:12:00 UTC) #34
neis
https://codereview.chromium.org/1748923003/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1748923003/diff/160001/src/objects.cc#newcode8538 src/objects.cc:8538: if (!iter.AdvanceFollowingProxiesIgnoringAccessChecks()) { Can you explain the "IgnoringAccessChecks" part ...
4 years, 9 months ago (2016-03-18 14:30:02 UTC) #35
Camillo Bruni
https://codereview.chromium.org/1748923003/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1748923003/diff/160001/src/objects.cc#newcode8538 src/objects.cc:8538: if (!iter.AdvanceFollowingProxiesIgnoringAccessChecks()) { On 2016/03/18 at 14:30:02, neis wrote: ...
4 years, 9 months ago (2016-03-18 17:46:34 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/180001
4 years, 9 months ago (2016-03-22 18:02:33 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/12048) v8_linux64_rel_ng on ...
4 years, 9 months ago (2016-03-22 18:03:44 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1748923003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1748923003/200001
4 years, 9 months ago (2016-03-23 08:00:38 UTC) #45
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 9 months ago (2016-03-23 08:26:45 UTC) #46
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 08:37:14 UTC) #48
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/2efc1381313248352630b05f6d48064badfe7671
Cr-Commit-Position: refs/heads/master@{#35017}

Powered by Google App Engine
This is Rietveld 408576698