From 17143b002200a459cf20ca9372dcc6af7cce475e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 12 Jul 2012 00:03:25 -0700 Subject: [PATCH] Bug 773153: don't use operand context when looking for line end. r=njn --- js/src/frontend/Parser.cpp | 2 +- js/src/jit-test/tests/basic/bug773153.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 js/src/jit-test/tests/basic/bug773153.js diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index b310767ebbd6..6814e2b446ba 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -1891,7 +1891,7 @@ Parser::processDirectives(ParseNode *stmts) const Token directive = tokenStream.currentToken(); bool isDirective = IsEscapeFreeStringLiteral(directive); JSAtom *atom = directive.atom(); - TokenKind next = tokenStream.peekTokenSameLine(TSF_OPERAND); + TokenKind next = tokenStream.peekTokenSameLine(); if (next != TOK_EOF && next != TOK_EOL && next != TOK_SEMI && next != TOK_RC) { freeTree(stringNode); if (next == TOK_ERROR) diff --git a/js/src/jit-test/tests/basic/bug773153.js b/js/src/jit-test/tests/basic/bug773153.js new file mode 100644 index 000000000000..6eacea853da0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug773153.js @@ -0,0 +1,3 @@ +function f() { + "" < ""; +}