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

Issue 175009: Fix an assert in the parser that fails if extensions code using 'eval'... (Closed)

Created:
11 years, 3 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove asserts that do not hold when lazily compiling extension code. Add checks for the use of eval and with in natives files to the js2c script. Committed: http://code.google.com/p/v8/source/detail?r=2786

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -29 lines) Patch
M src/d8.js View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +39 lines, -12 lines 0 comments Download
M tools/js2c.py View 6 chunks +29 lines, -7 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Mads Ager (chromium)
11 years, 3 months ago (2009-08-28 13:07:01 UTC) #1
Christian Plesner Hansen
As discussed, it would probably be better to let the preprocessor handle this at compile ...
11 years, 3 months ago (2009-08-28 13:11:51 UTC) #2
Mads Ager (chromium)
Invalid asserts removed and checking added to preprocessor script.
11 years, 3 months ago (2009-08-31 11:02:28 UTC) #3
Christian Plesner Hansen
11 years, 3 months ago (2009-08-31 12:42:44 UTC) #4
Lgtm

http://codereview.chromium.org/175009/diff/8001/8004
File tools/js2c.py (right):

http://codereview.chromium.org/175009/diff/8001/8004#newcode114
Line 114: raise ("Eval disallowed in natives: " + file)
The formatting operator % should be used for string formatting in python:

"Eval disallowed in natives: %s" % file

http://codereview.chromium.org/175009/diff/8001/8004#newcode300
Line 300: delay = str(s).endswith('-delay.js')
We use str(s) so many places here -- maybe do something like

for module in modules:
  filename = str(module)
  ...

Powered by Google App Engine
This is Rietveld 408576698