author | Carsten "Tomcat" Book <cbook@mozilla.com> |
Wed, 10 May 2017 13:01:23 +0200 | |
changeset 357485 | dc3008e45ba6cf5130eec89598fd51d1e6bbbc27 |
parent 357484 | df9358a0469ad540a31aedbd4307ed9f5c3cd532 |
child 357486 | fee1367bc91ba936df64265fadb795cef6bd67e4 |
push id | 31792 |
push user | cbook@mozilla.com |
push date | Wed, 10 May 2017 13:07:59 +0000 |
treeherder | mozilla-central@ebbcdaa5b580 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1363191 |
milestone | 55.0a1 |
backs out | cf2ee5242986e5d087ac48238a1fca8e96d6e1a9 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/frontend/Parser.cpp | file | annotate | diff | comparison | revisions | |
js/src/jit-test/tests/parser/bug-1363191.js | file | annotate | diff | comparison | revisions |
--- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -2093,34 +2093,31 @@ Parser<FullParseHandler, char16_t>::eval ParseContext evalpc(this, evalsc, /* newDirectives = */ nullptr); if (!evalpc.init()) return nullptr; ParseContext::VarScope varScope(this); 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; - - body = statementList(YieldIsName); - if (!body) - return nullptr; - - if (!checkStatementsEOF()) - return nullptr; - - body = finishLexicalScope(lexicalScope, body); - if (!body) - return nullptr; - } + // All evals have an implicit non-extensible lexical scope. + ParseContext::Scope lexicalScope(this); + if (!lexicalScope.init(pc)) + return nullptr; + + ParseNode* body = statementList(YieldIsName); + if (!body) + return nullptr; + + if (!checkStatementsEOF()) + return nullptr; + + body = finishLexicalScope(lexicalScope, body); + if (!body) + return nullptr; // It's an error to use 'arguments' in a legacy generator expression. // // If 'arguments' appears free (i.e. not a declared name) or if the // declaration does not shadow the enclosing script's 'arguments' // binding (i.e. not a lexical declaration), check the enclosing // script. if (hasUsedName(context->names().arguments)) {