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

Issue 1686433003: Use a for-of loop in Array.from (Closed)

Created:
4 years, 10 months ago by Dan Ehrenberg
Modified:
4 years, 10 months ago
Reviewers:
neis, 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

Use a for-of loop in Array.from If Array.from is passed an iterable, then it will copy the contents to the newly created Array (or subclass). The iteration protocol here includes calling IteratorClose if the loop is exited early due to an exception thrown. This patch converts Array.from to use a for-of loop rather than explicitly invoking the iteration protocol so that, when IteratorClose is invoked on early for-of exit, then Array.from will call IteratorClose in the appropriate case. R=neis LOG=Y BUG=v8:4739 Committed: https://crrev.com/defcc6424409856b0a84f7efacd7b21d8c22bfdd Cr-Commit-Position: refs/heads/master@{#33859}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use GetIterator #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -15 lines) Patch
M src/js/array.js View 1 2 chunks +4 lines, -15 lines 0 comments Download

Messages

Total messages: 19 (8 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/1686433003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686433003/1
4 years, 10 months ago (2016-02-09 15:35:49 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-09 15:55:18 UTC) #4
Dan Ehrenberg
4 years, 10 months ago (2016-02-09 15:56:45 UTC) #5
Dan Ehrenberg
4 years, 10 months ago (2016-02-09 16:09:34 UTC) #7
neis
lgtm, just one comment. https://codereview.chromium.org/1686433003/diff/1/src/js/array.js File src/js/array.js (right): https://codereview.chromium.org/1686433003/diff/1/src/js/array.js#newcode1782 src/js/array.js:1782: { [iteratorSymbol]() { return %_Call(iterable, ...
4 years, 10 months ago (2016-02-10 08:38:29 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686433003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686433003/20001
4 years, 10 months ago (2016-02-10 09:25:53 UTC) #10
Dan Ehrenberg
https://codereview.chromium.org/1686433003/diff/1/src/js/array.js File src/js/array.js (right): https://codereview.chromium.org/1686433003/diff/1/src/js/array.js#newcode1782 src/js/array.js:1782: { [iteratorSymbol]() { return %_Call(iterable, items) } }) { ...
4 years, 10 months ago (2016-02-10 09:25:54 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-10 09:47:09 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686433003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686433003/20001
4 years, 10 months ago (2016-02-10 09:55:47 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-10 09:57:07 UTC) #17
commit-bot: I haz the power
4 years, 10 months ago (2016-02-10 09:57:31 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/defcc6424409856b0a84f7efacd7b21d8c22bfdd
Cr-Commit-Position: refs/heads/master@{#33859}

Powered by Google App Engine
This is Rietveld 408576698