Bug 853239 - warn on a statement expression use (r=jorendorff)
This commit is contained in:
@@ -268,7 +268,7 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain,
|
||||
TokenStream::Position pos(parser.keepAtoms);
|
||||
parser.tokenStream.tell(&pos);
|
||||
|
||||
ParseNode *pn = parser.statement();
|
||||
ParseNode *pn = parser.statement(canHaveDirectives);
|
||||
if (!pn) {
|
||||
if (parser.hadAbortedSyntaxParse()) {
|
||||
// Parsing inner functions lazily may lead the parser into an
|
||||
|
||||
Reference in New Issue
Block a user