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

Unified Diff: src/parser.cc

Issue 175009: Fix an assert in the parser that fails if extensions code using 'eval'... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.js ('k') | test/cctest/test-api.cc » ('j') | tools/js2c.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
===================================================================
--- src/parser.cc (revision 2783)
+++ src/parser.cc (working copy)
@@ -2397,12 +2397,6 @@
// WithStatement ::
// 'with' '(' Expression ')' Statement
- // We do not allow the use of 'with' statements in the internal JS
- // code. If 'with' statements were allowed, the simplified setup of
- // the runtime context chain would allow access to properties in the
- // global object from within a 'with' statement.
- ASSERT(extension_ != NULL || !Bootstrapper::IsActive());
-
Expect(Token::WITH, CHECK_OK);
Expect(Token::LPAREN, CHECK_OK);
Expression* expr = ParseExpression(true, CHECK_OK);
@@ -3088,9 +3082,6 @@
Handle<String> name = callee->name();
Variable* var = top_scope_->Lookup(name);
if (var == NULL) {
- // We do not allow direct calls to 'eval' in our internal
- // JS files. Use builtin functions instead.
- ASSERT(extension_ != NULL || !Bootstrapper::IsActive());
top_scope_->RecordEvalCall();
is_potentially_direct_eval = true;
}
« no previous file with comments | « src/d8.js ('k') | test/cctest/test-api.cc » ('j') | tools/js2c.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698