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;