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

Issue 1385913003: Fix legacy const for-of/in destructuring (Closed)

Created:
5 years, 2 months ago by Dan Ehrenberg
Modified:
5 years, 2 months ago
Reviewers:
adamk
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

Fix legacy const for-of/in destructuring Previously, using legacy const in for-of/in loops led to a check-fail in the parser. This was due to the fact that the destructuring bind led to an undefined initialization to undefined in the parser, which caused the for loop code to go down a strange path. This patch eliminates the undefined initialization in variables declared in for-in/of loops, so that that path is not used and the error is fixed. BUG=v8:4461 LOG=Y R=adamk Committed: https://crrev.com/38465598c82ac73ca4dcf3f2855df1ee1709a6d6 Cr-Commit-Position: refs/heads/master@{#31117}

Patch Set 1 #

Total comments: 1

Patch Set 2 : rephrasing suggested by Adam #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M src/parser.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/pattern-rewriter.cc View 1 1 chunk +1 line, -1 line 1 comment Download
M test/mjsunit/harmony/destructuring.js View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (5 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/1385913003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1385913003/1
5 years, 2 months ago (2015-10-05 18:06:29 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-05 18:52:45 UTC) #4
Dan Ehrenberg
5 years, 2 months ago (2015-10-05 20:03:57 UTC) #5
adamk
https://codereview.chromium.org/1385913003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1385913003/diff/1/src/parser.cc#newcode2556 src/parser.cc:2556: if (is_for_iteration_variable && parsing_result->descriptor.mode == CONST) { Could you ...
5 years, 2 months ago (2015-10-05 20:13:19 UTC) #6
Dan Ehrenberg
On 2015/10/05 at 20:13:19, adamk wrote: > https://codereview.chromium.org/1385913003/diff/1/src/parser.cc > File src/parser.cc (right): > > https://codereview.chromium.org/1385913003/diff/1/src/parser.cc#newcode2556 ...
5 years, 2 months ago (2015-10-05 22:09:41 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1385913003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1385913003/20001
5 years, 2 months ago (2015-10-05 22:10:08 UTC) #9
adamk
lgtm https://codereview.chromium.org/1385913003/diff/20001/src/pattern-rewriter.cc File src/pattern-rewriter.cc (right): https://codereview.chromium.org/1385913003/diff/20001/src/pattern-rewriter.cc#newcode178 src/pattern-rewriter.cc:178: } else if (value != nullptr && (descriptor_->mode ...
5 years, 2 months ago (2015-10-05 22:17:51 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-05 22:31:38 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1385913003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1385913003/20001
5 years, 2 months ago (2015-10-05 22:34:49 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-05 22:36:25 UTC) #15
commit-bot: I haz the power
5 years, 2 months ago (2015-10-05 22:36:47 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/38465598c82ac73ca4dcf3f2855df1ee1709a6d6
Cr-Commit-Position: refs/heads/master@{#31117}

Powered by Google App Engine
This is Rietveld 408576698