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

Issue 1731773003: Ensure IteratorClose is called for errors in non-declaring assignments (Closed)

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

Ensure IteratorClose is called for errors in non-declaring assignments There was a bug in for-of loops without newly declared variables: If, in performing the assignment, an exception were thrown, then IteratorClose would not be called. The problem was that the assignment is done as part of assign_each, which happens before the loop is put back in the state which is recognized to be breaking/throwing/returning early. This patch modifies the for-of desugaring by setting the loop state before, rather than after, evaluating the assign_each portion, which is responsible for evaluating the assignment in for-of loops which do not have a declaration. This patch, together with https://codereview.chromium.org/1728973002 , allow all test262 iterator return-related tests to pass. R=rossberg BUG=v8:4776 LOG=Y Committed: https://crrev.com/1aee75551ea3237ab653a998e492110e50f18cdd Cr-Commit-Position: refs/heads/master@{#34262}

Patch Set 1 #

Patch Set 2 : Fixed the issue where I forgot to allocate the 'each' variable #

Patch Set 3 : Rebase and fix test262 expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -21 lines) Patch
M src/parsing/parser.cc View 1 2 5 chunks +48 lines, -17 lines 0 comments Download
M test/mjsunit/harmony/iterator-close.js View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 2 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (9 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/1731773003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1731773003/1
4 years, 10 months ago (2016-02-24 06:55:35 UTC) #2
Dan Ehrenberg
This is still a work in progress, as the error thrown from the test case ...
4 years, 10 months ago (2016-02-24 06:59:06 UTC) #3
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/15906)
4 years, 10 months ago (2016-02-24 07:08:22 UTC) #5
rossberg
Nice, lgtm, modulo the remaining bug. Thanks!
4 years, 10 months ago (2016-02-24 11:29:48 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1731773003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1731773003/40001
4 years, 10 months ago (2016-02-24 18:27:01 UTC) #10
Dan Ehrenberg
On 2016/02/24 at 11:29:48, rossberg wrote: > Nice, lgtm, modulo the remaining bug. Thanks! Fixed ...
4 years, 10 months ago (2016-02-24 18:28:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1731773003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1731773003/40001
4 years, 10 months ago (2016-02-24 18:43:22 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-24 18:52:22 UTC) #16
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 18:52:35 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/1aee75551ea3237ab653a998e492110e50f18cdd
Cr-Commit-Position: refs/heads/master@{#34262}

Powered by Google App Engine
This is Rietveld 408576698