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

Issue 1384413002: Destructuring array without initializer throws an exception (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

Destructuring array without initializer throws an exception Previously, cases like var [foo] led to a parser crash because the parser tried to do something with the initializer, which was not syntactically present. This patch fixes the parser issue (implicitly creating an undefined initializer) and inserts a check for array destructuring that the right-hand side is coercible to an object, so it can have iterator methods called on it safely. BUG=v8:4462 LOG=Y R=adamk Committed: https://crrev.com/2e7077e02c2aacda5bc349b415b46dbb9e2f1a34 Cr-Commit-Position: refs/heads/master@{#31128}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -6 lines) Patch
M src/pattern-rewriter.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M test/mjsunit/harmony/destructuring.js View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 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/1384413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1384413002/1
5 years, 2 months ago (2015-10-06 00:11:47 UTC) #2
Dan Ehrenberg
5 years, 2 months ago (2015-10-06 00:12:21 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-06 00:37:30 UTC) #5
adamk
lgtm
5 years, 2 months ago (2015-10-06 16:59:47 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1384413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1384413002/1
5 years, 2 months ago (2015-10-06 17:00:01 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-06 17:01:15 UTC) #9
commit-bot: I haz the power
5 years, 2 months ago (2015-10-06 17:01:39 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2e7077e02c2aacda5bc349b415b46dbb9e2f1a34
Cr-Commit-Position: refs/heads/master@{#31128}

Powered by Google App Engine
This is Rietveld 408576698