From 76338929ce7e3e42a9cae4db5e05c0b7a566dcb9 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Wed, 10 May 2017 13:01:23 +0200 Subject: [PATCH] Backed out changeset cf2ee5242986 (bug 1363191) --- js/src/frontend/Parser.cpp | 27 +++++++++------------ js/src/jit-test/tests/parser/bug-1363191.js | 2 -- 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 js/src/jit-test/tests/parser/bug-1363191.js diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 9852b4f6dfb0..8af7ad8310d6 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -2098,24 +2098,21 @@ Parser::evalBody(EvalSharedContext* evalsc) if (!varScope.init(pc)) return nullptr; - ParseNode* body; - { - // All evals have an implicit non-extensible lexical scope. - ParseContext::Scope lexicalScope(this); - if (!lexicalScope.init(pc)) - return nullptr; + // All evals have an implicit non-extensible lexical scope. + ParseContext::Scope lexicalScope(this); + if (!lexicalScope.init(pc)) + return nullptr; - body = statementList(YieldIsName); - if (!body) - return nullptr; + ParseNode* body = statementList(YieldIsName); + if (!body) + return nullptr; - if (!checkStatementsEOF()) - return nullptr; + if (!checkStatementsEOF()) + return nullptr; - body = finishLexicalScope(lexicalScope, body); - if (!body) - return nullptr; - } + body = finishLexicalScope(lexicalScope, body); + if (!body) + return nullptr; // It's an error to use 'arguments' in a legacy generator expression. // diff --git a/js/src/jit-test/tests/parser/bug-1363191.js b/js/src/jit-test/tests/parser/bug-1363191.js deleted file mode 100644 index 779e1a5d1a06..000000000000 --- a/js/src/jit-test/tests/parser/bug-1363191.js +++ /dev/null @@ -1,2 +0,0 @@ -eval("{ function f() {} }"); -let f;