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

Issue 1181623003: In Array.of and Array.from, fall back to DefineOwnProperty (Closed)

Created:
5 years, 6 months ago by dehrenberg
Modified:
5 years, 6 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

In Array.of and Array.from, fall back to DefineOwnProperty %AddElement is not intended for objects which are not arrays, and its behavior may go away with future refactorings. This patch gets rid of it if the receiver of from or of is not the intrinsic Array object. Array.of and Array.from previously papered over failures in calling [[DefineOwnProperty]] when setting array elements. This patch makes them lead to exceptions, and adds tests to assert that the appropriate exceptions are thrown. BUG=v8:4168 R=adamk CC=rossberg,verwaest LOG=Y Committed: https://crrev.com/b23c328f53b4579fa9d9f5c2c344839244d0f526 Cr-Commit-Position: refs/heads/master@{#28969}

Patch Set 1 #

Total comments: 14

Patch Set 2 : fix property attributes #

Total comments: 4

Patch Set 3 : Improve tests #

Patch Set 4 : fix merge conflict #

Patch Set 5 : fix %AddElement call, changed in rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -6 lines) Patch
M src/harmony-array.js View 1 2 3 4 6 chunks +16 lines, -6 lines 0 comments Download
M src/prologue.js View 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/harmony/array-from.js View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/array-of.js View 1 2 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (11 generated)
Dan Ehrenberg
5 years, 6 months ago (2015-06-11 07:59:14 UTC) #2
Toon Verwaest
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { Is this enough? A ...
5 years, 6 months ago (2015-06-11 08:03:15 UTC) #4
arv (Not doing code reviews)
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 08:03:14, Toon ...
5 years, 6 months ago (2015-06-11 13:04:01 UTC) #6
Toon Verwaest
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 13:04:01, arv ...
5 years, 6 months ago (2015-06-11 13:09:23 UTC) #7
adamk
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 13:09:23, Toon ...
5 years, 6 months ago (2015-06-11 15:12:10 UTC) #8
arv (Not doing code reviews)
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 15:12:10, adamk ...
5 years, 6 months ago (2015-06-11 15:19:38 UTC) #9
adamk
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 15:19:37, arv ...
5 years, 6 months ago (2015-06-11 15:26:40 UTC) #10
arv (Not doing code reviews)
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 15:26:40, adamk ...
5 years, 6 months ago (2015-06-11 15:30:01 UTC) #11
Toon Verwaest
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js File src/harmony-array.js (right): https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197 src/harmony-array.js:197: if (constructor === GlobalArray) { On 2015/06/11 15:12:10, adamk ...
5 years, 6 months ago (2015-06-11 15:35:33 UTC) #12
Dan Ehrenberg
The new version should fix the issue with properties defined wrong. Is there anything else ...
5 years, 6 months ago (2015-06-11 16:27:25 UTC) #13
arv (Not doing code reviews)
LGTM with nits https://codereview.chromium.org/1181623003/diff/1/test/mjsunit/harmony/array-from.js File test/mjsunit/harmony/array-from.js (right): https://codereview.chromium.org/1181623003/diff/1/test/mjsunit/harmony/array-from.js#newcode170 test/mjsunit/harmony/array-from.js:170: })(); On 2015/06/11 16:27:25, littledan wrote: ...
5 years, 6 months ago (2015-06-11 16:41:31 UTC) #14
Dan Ehrenberg
https://codereview.chromium.org/1181623003/diff/20001/test/mjsunit/harmony/array-from.js File test/mjsunit/harmony/array-from.js (right): https://codereview.chromium.org/1181623003/diff/20001/test/mjsunit/harmony/array-from.js#newcode160 test/mjsunit/harmony/array-from.js:160: // Check that exotic was defined right On 2015/06/11 ...
5 years, 6 months ago (2015-06-11 17:25:44 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181623003/40001
5 years, 6 months ago (2015-06-11 17:26:17 UTC) #18
commit-bot: I haz the power
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/1251) v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 6 months ago (2015-06-11 17:27:36 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181623003/60001
5 years, 6 months ago (2015-06-11 18:50:00 UTC) #23
commit-bot: I haz the power
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/1254)
5 years, 6 months ago (2015-06-11 19:06:00 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181623003/80001
5 years, 6 months ago (2015-06-11 20:13:18 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 6 months ago (2015-06-11 20:40:59 UTC) #29
commit-bot: I haz the power
5 years, 6 months ago (2015-06-11 20:41:13 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b23c328f53b4579fa9d9f5c2c344839244d0f526
Cr-Commit-Position: refs/heads/master@{#28969}

Powered by Google App Engine
This is Rietveld 408576698