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

Issue 1814933002: Throw the right exceptions from setting elements in Array.prototype.concat (Closed)

Created:
4 years, 9 months ago by Dan Ehrenberg
Modified:
4 years, 9 months ago
Reviewers:
adamk, Camillo Bruni
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

Throw the right exceptions from setting elements in Array.prototype.concat This patch fixes two bugs in Array.prototype.concat in conjunction with subclassing Arrays: - Create a new property rather than calling Set when adding elements to the output array. This means setters are not called. - If there is an exception thrown from DefineProperty, propagate it outwards properly, rather than swallowing it. This can occur, e.g., with a Proxy as the new output array. R=adamk LOG=Y BUG=chromium:595319 Committed: https://crrev.com/7acee1ef61ce2afd6dd8688499fad7475bcd82cd Cr-Commit-Position: refs/heads/master@{#34876}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Ensure this works for frozen properties #

Patch Set 3 : Depend on CreateDataProperty to throw #

Total comments: 7

Patch Set 4 : cleanups from review, with fewer DCHECKs #

Patch Set 5 : format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -9 lines) Patch
M src/builtins.cc View 1 2 3 4 4 chunks +7 lines, -9 lines 0 comments Download
A test/mjsunit/regress/regress-595319.js View 1 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (9 generated)
Dan Ehrenberg
4 years, 9 months ago (2016-03-17 19:04:10 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814933002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814933002/1
4 years, 9 months ago (2016-03-17 19:04:18 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_rel/builds/11916) v8_linux_nodcheck_rel on ...
4 years, 9 months ago (2016-03-17 19:06:48 UTC) #5
adamk
https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc#newcode723 src/builtins.cc:723: &it, elm, AbstractCode::ShouldThrow::THROW_ON_ERROR); "Object::THROW_ON_ERROR" is the usual way of ...
4 years, 9 months ago (2016-03-17 19:22:21 UTC) #7
Dan Ehrenberg
https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc#newcode723 src/builtins.cc:723: &it, elm, AbstractCode::ShouldThrow::THROW_ON_ERROR); On 2016/03/17 at 19:22:21, adamk wrote: ...
4 years, 9 months ago (2016-03-17 20:26:33 UTC) #8
adamk
https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc#newcode725 src/builtins.cc:725: DCHECK(success.FromJust()); On 2016/03/17 20:26:33, Dan Ehrenberg wrote: > On ...
4 years, 9 months ago (2016-03-17 20:33:59 UTC) #9
adamk
https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc#newcode725 src/builtins.cc:725: DCHECK(success.FromJust()); On 2016/03/17 20:33:59, adamk wrote: > On 2016/03/17 ...
4 years, 9 months ago (2016-03-17 20:39:54 UTC) #10
Dan Ehrenberg
https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/1/src/builtins.cc#newcode725 src/builtins.cc:725: DCHECK(success.FromJust()); On 2016/03/17 at 20:39:54, adamk wrote: > On ...
4 years, 9 months ago (2016-03-17 21:15:53 UTC) #11
adamk
Looking good, but some suggestions on matching the surrounding coding style. https://codereview.chromium.org/1814933002/diff/40001/src/builtins.cc File src/builtins.cc (right): ...
4 years, 9 months ago (2016-03-17 21:31:32 UTC) #12
Dan Ehrenberg
https://codereview.chromium.org/1814933002/diff/40001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1814933002/diff/40001/src/builtins.cc#newcode709 src/builtins.cc:709: bool visit(uint32_t i, Handle<Object> elm) { On 2016/03/17 at ...
4 years, 9 months ago (2016-03-17 22:11:01 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814933002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814933002/60001
4 years, 9 months ago (2016-03-17 22:11:16 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/12551)
4 years, 9 months ago (2016-03-17 22:14:47 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814933002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814933002/80001
4 years, 9 months ago (2016-03-17 22:16:09 UTC) #19
adamk
lgtm % formatting (which I think is why the presubmit is failing) https://codereview.chromium.org/1814933002/diff/40001/src/builtins.cc File src/builtins.cc ...
4 years, 9 months ago (2016-03-17 22:16:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814933002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814933002/80001
4 years, 9 months ago (2016-03-17 22:18:46 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-17 22:41:32 UTC) #24
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 22:42:11 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7acee1ef61ce2afd6dd8688499fad7475bcd82cd
Cr-Commit-Position: refs/heads/master@{#34876}

Powered by Google App Engine
This is Rietveld 408576698