☠☠ backed out by dc3008e45ba6 ☠ ☠ | |
author | Shu-yu Guo <shu@rfrn.org> |
Tue, 09 May 2017 14:45:27 -0700 | |
changeset 357444 | cf2ee5242986e5d087ac48238a1fca8e96d6e1a9 |
parent 357443 | 8756a6262190bdd3945a873f80c6aadd41da3aad |
child 357445 | 5a473a4e0eed937aea85cd97725dd93a85fbdf0c |
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) |
reviewers | anba |
bugs | 1363191 |
milestone | 55.0a1 |
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,31 +2093,34 @@ 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; - // 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; + 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; + } // 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)) {