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

Issue 2332503002: [elements] Handlify SloppyArguments IndexOfValueImpl (Closed)

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

Description

[elements] Handlify SloppyArguments IndexOfValueImpl The raw pointer to the parameter_map might get stale in case of accessors present on the arguments object. Drive-by-fix: use nullptr instead of the_hole with isolate access. BUG=chromium:645680 Committed: https://crrev.com/621f4af7200ef76bfafa671efa6121bb9b6fb630 Cr-Commit-Position: refs/heads/master@{#39359}

Patch Set 1 #

Patch Set 2 : adding regression test #

Patch Set 3 : adding elements.cc again #

Total comments: 3

Patch Set 4 : use bool instead of nullptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -15 lines) Patch
M src/elements.cc View 1 2 3 4 chunks +10 lines, -11 lines 0 comments Download
M test/mjsunit/array-indexing-receiver.js View 1 5 chunks +6 lines, -4 lines 0 comments Download
A test/mjsunit/regress/regress-645680.js View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (14 generated)
Camillo Bruni
PTAL
4 years, 3 months ago (2016-09-10 02:32:44 UTC) #4
caitp
lgtm https://codereview.chromium.org/2332503002/diff/40001/src/elements.cc File src/elements.cc (right): https://codereview.chromium.org/2332503002/diff/40001/src/elements.cc#newcode2998 src/elements.cc:2998: return index < length ? parameter_map->get(index + 2) ...
4 years, 3 months ago (2016-09-10 02:48:37 UTC) #9
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/2332503002/60001
4 years, 3 months ago (2016-09-12 16:59:14 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-12 17:31:31 UTC) #17
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/621f4af7200ef76bfafa671efa6121bb9b6fb630 Cr-Commit-Position: refs/heads/master@{#39359}
4 years, 3 months ago (2016-09-12 17:32:14 UTC) #19
Camillo Bruni
4 years, 3 months ago (2016-09-14 16:48:54 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2332503002/diff/40001/test/mjsunit/array-inde...
File test/mjsunit/array-indexing-receiver.js (right):

https://codereview.chromium.org/2332503002/diff/40001/test/mjsunit/array-inde...
test/mjsunit/array-indexing-receiver.js:110: Object.defineProperty(array, 4, {
get() { gc(); return NaN; } });
On 2016/09/10 at 02:48:37, caitp wrote:
> Adding `gc` all over the place seems like it could make these tests
unrealistic, and reduce coverage. Don't we get this same-ish behaviour for
variants with a reduced gc threshold or whatever? If we need properties which
are guaranteed to cause a gc on access, maybe that should be in addition to,
rather than replacing, the existing ones.
> 
> If you think this is still representative of real world JS, then it's fine by
me

the --gc-interval trick only works if there is an allocation happening in
between.
Internally, causing a gc() is probably the worst kind of side-effect you can
cause.
Given that we don't rely on optimizations in this test I don't think that this
causes any unwanted changes to the test.

Powered by Google App Engine
This is Rietveld 408576698