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

Issue 2185223002: Fix not throwing error when redefine eval or arguments in strict mode. (Closed)

Created:
4 years, 4 months ago by lpy
Modified:
4 years, 4 months ago
Reviewers:
Dan Ehrenberg, 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 not throwing error when redefine eval or arguments in strict mode. Currently when redefining eval or arguments in non-simple parameter list and destructuring binding, V8 doesn't throw any error, this patch fixes it. BUG=v8:5201 LOG=N Committed: https://crrev.com/0c95efb7b79e6baec1dec2a75c5c3187b3a6df46 Cr-Commit-Position: refs/heads/master@{#38762}

Patch Set 1 #

Patch Set 2 : add test #

Total comments: 6

Patch Set 3 : update #

Total comments: 5

Patch Set 4 : update #

Total comments: 1

Patch Set 5 : update&rebase #

Total comments: 6

Patch Set 6 : Clean up tests and rebase #

Total comments: 6

Patch Set 7 : Clean up tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -1 line) Patch
M src/parsing/parser-base.h View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 3 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (38 generated)
lpy
PTAL.
4 years, 4 months ago (2016-07-27 23:53:12 UTC) #10
Dan Ehrenberg
https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h#newcode1973 src/parsing/parser-base.h:1973: if (IsValidReferenceExpression(lhs) && peek() == Token::ASSIGN) { Does the ...
4 years, 4 months ago (2016-07-28 00:13:38 UTC) #11
lpy
On 2016/07/28 00:13:38, Dan Ehrenberg wrote: > https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h > File src/parsing/parser-base.h (right): > > https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h#newcode1973 ...
4 years, 4 months ago (2016-07-28 00:18:39 UTC) #12
adamk
So it looks like this is currently broken not just for parameter destructuring, but for ...
4 years, 4 months ago (2016-07-28 18:33:44 UTC) #13
adamk
https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h#newcode1992 src/parsing/parser-base.h:1992: ReportMessageAt(Scanner::Location(next_beg_pos, next_end_pos), I think you should be able to ...
4 years, 4 months ago (2016-07-28 18:46:55 UTC) #14
lpy
Thanks for the feedback, I made a few updates. PTAL. https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/20001/src/parsing/parser-base.h#newcode1992 ...
4 years, 4 months ago (2016-08-05 22:15:42 UTC) #19
adamk
Looking better. I'd really like to see tests for this in test-parsing.cc. https://codereview.chromium.org/2185223002/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h ...
4 years, 4 months ago (2016-08-05 22:29:29 UTC) #20
lpy
PTAL. The positive test for `arguments` is blocked by https://bugs.chromium.org/p/v8/issues/detail?id=4577 https://codereview.chromium.org/2185223002/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/40001/src/parsing/parser-base.h#newcode1910 ...
4 years, 4 months ago (2016-08-09 01:01:47 UTC) #25
adamk
See below, I think this needs more test coverage because I think it doesn't work. ...
4 years, 4 months ago (2016-08-09 17:00:51 UTC) #26
lpy
Thank you for the feedback, I updated the CL. PTAL. On 2016/08/09 17:00:51, adamk wrote: ...
4 years, 4 months ago (2016-08-16 23:10:35 UTC) #32
adamk
https://codereview.chromium.org/2185223002/diff/80001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/80001/src/parsing/parser-base.h#newcode1998 src/parsing/parser-base.h:1998: classifier->RecordStrictModeFormalParameterError( Can you explain why this is needed? In ...
4 years, 4 months ago (2016-08-17 19:32:52 UTC) #33
lpy
I cleaned up the tests, ptal. https://codereview.chromium.org/2185223002/diff/80001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2185223002/diff/80001/src/parsing/parser-base.h#newcode1998 src/parsing/parser-base.h:1998: classifier->RecordStrictModeFormalParameterError( On 2016/08/17 ...
4 years, 4 months ago (2016-08-19 17:00:40 UTC) #43
adamk
Almost there, just a few more test changes please. https://codereview.chromium.org/2185223002/diff/120001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/2185223002/diff/120001/test/cctest/test-parsing.cc#newcode6362 test/cctest/test-parsing.cc:6362: ...
4 years, 4 months ago (2016-08-19 18:14:56 UTC) #44
lpy
Thanks, I updated the CL, ptal. https://codereview.chromium.org/2185223002/diff/120001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/2185223002/diff/120001/test/cctest/test-parsing.cc#newcode6362 test/cctest/test-parsing.cc:6362: "function f(argument1, {eval} ...
4 years, 4 months ago (2016-08-19 18:58:18 UTC) #47
adamk
lgtm
4 years, 4 months ago (2016-08-19 19:00:13 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2185223002/140001
4 years, 4 months ago (2016-08-19 19:46:25 UTC) #52
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 4 months ago (2016-08-19 19:48:06 UTC) #54
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 19:48:29 UTC) #56
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/0c95efb7b79e6baec1dec2a75c5c3187b3a6df46
Cr-Commit-Position: refs/heads/master@{#38762}

Powered by Google App Engine
This is Rietveld 408576698