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

Issue 1059273004: [strong] Implement static restrictions on direct eval (Closed)

Created:
5 years, 8 months ago by conradw
Modified:
5 years, 8 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[strong] Implement static restrictions on direct eval Does not entirely disallow the use of 'eval' as an identifier in strong mode, as originally proposed. BUG=v8:3956 LOG=N Committed: https://crrev.com/c983689d39ebd27b0be81542f0721eb5f5d5e3b8 Cr-Commit-Position: refs/heads/master@{#27796}

Patch Set 1 #

Patch Set 2 : parser sync tests #

Patch Set 3 : Fix strong tests using eval #

Total comments: 6

Patch Set 4 : test, fix bracketed eval #

Patch Set 5 : new parser synch tests #

Total comments: 2

Patch Set 6 : follow naming conventions for test #

Patch Set 7 : cr feedback #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -17 lines) Patch
M src/messages.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/preparser.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 1 chunk +30 lines, -0 lines 1 comment Download
M test/mjsunit/strong/classes.js View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M test/mjsunit/strong/declaration-after-use.js View 1 2 2 chunks +0 lines, -14 lines 0 comments Download
A test/mjsunit/strong/eval-direct.js View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M test/mjsunit/strong/use-strong.js View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 15 (5 generated)
conradw
On 2015/04/13 13:05:25, conradw wrote: > mailto:conradw@chromium.org changed reviewers: > + mailto:rossberg@chromium.org PTAL
5 years, 8 months ago (2015-04-13 13:05:40 UTC) #2
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/1059273004/diff/40001/test/mjsunit/strong/classes.js File test/mjsunit/strong/classes.js (left): https://codereview.chromium.org/1059273004/diff/40001/test/mjsunit/strong/classes.js#oldcode19 test/mjsunit/strong/classes.js:19: assertTypeError(function(){ eval("D = 0") }); This can be ...
5 years, 8 months ago (2015-04-13 14:14:07 UTC) #4
conradw
I've been informed offline by rossberg that my change doesn't cover (eval)(); which is also ...
5 years, 8 months ago (2015-04-13 14:36:33 UTC) #5
conradw
PTAL Fixed the problematic case
5 years, 8 months ago (2015-04-13 16:24:51 UTC) #6
rossberg
lgtm https://codereview.chromium.org/1059273004/diff/80001/test/mjsunit/strong/classes.js File test/mjsunit/strong/classes.js (right): https://codereview.chromium.org/1059273004/diff/80001/test/mjsunit/strong/classes.js#newcode12 test/mjsunit/strong/classes.js:12: let ind_eval = eval; Nit: indirect_eval https://codereview.chromium.org/1059273004/diff/80001/test/mjsunit/strong/classes.js#newcode25 test/mjsunit/strong/classes.js:25: ...
5 years, 8 months ago (2015-04-13 16:32:26 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1059273004/120001
5 years, 8 months ago (2015-04-13 17:23:44 UTC) #10
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 8 months ago (2015-04-13 17:25:25 UTC) #11
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/c983689d39ebd27b0be81542f0721eb5f5d5e3b8 Cr-Commit-Position: refs/heads/master@{#27796}
5 years, 8 months ago (2015-04-13 17:25:33 UTC) #12
marja
https://codereview.chromium.org/1059273004/diff/120001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/1059273004/diff/120001/test/cctest/test-parsing.cc#newcode5923 test/cctest/test-parsing.cc:5923: "'use strong'; function f() {eval()}", For this kind of ...
5 years, 8 months ago (2015-04-13 19:13:07 UTC) #14
conradw
5 years, 8 months ago (2015-04-16 13:37:42 UTC) #15
Message was sent while issue was closed.
On 2015/04/13 19:13:07, marja wrote:
>
https://codereview.chromium.org/1059273004/diff/120001/test/cctest/test-parsi...
> File test/cctest/test-parsing.cc (right):
> 
>
https://codereview.chromium.org/1059273004/diff/120001/test/cctest/test-parsi...
> test/cctest/test-parsing.cc:5923: "'use strong'; function f() {eval()}",
> For this kind of a test, it would be useful to put the "use strong" into the
> context_data, and then have another non-strong context too.
> 
> Then you can test that none of these is an error in the non-strong context.
This
> protects you from testing errors where you make random typos and other random
> syntax errors here (so that the cause of the error is something else than what
> you meant).

Fixed this in another CL

Powered by Google App Engine
This is Rietveld 408576698