Bug 908813 - Only report asm.js warnings once during syntax-only parse (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Fri, 23 Aug 2013 14:39:59 -0500
changeset 158007 143b76709fabc191ff15b16dd59220a9c1ca7b28
parent 158006 0b02658e1f7c1ec38f0f78ee020e60446ef65254
child 158008 799ed2cf9e82882e031780f510bbd797b4716f0e
push id407
push userlsblakk@mozilla.com
push dateTue, 03 Dec 2013 03:32:50 +0000
treeherdermozilla-release@babf8c9ebc52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs908813
milestone26.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
Bug 908813 - Only report asm.js warnings once during syntax-only parse (r=bbouvier)
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -5045,16 +5045,18 @@ Parser<ParseHandler>::statement(bool can
         report(ParseError, false, null(), JSMSG_FINALLY_WITHOUT_TRY);
         return null();
 
       case TOK_ERROR:
         return null();
 
       case TOK_STRING:
         if (!canHaveDirectives && tokenStream.currentToken().atom() == context->names().useAsm) {
+            if (!abortIfSyntaxParser())
+                return null();
             if (!report(ParseWarning, false, null(), JSMSG_USE_ASM_DIRECTIVE_FAIL))
                 return null();
         }
         return expressionStatement();
 
       case TOK_YIELD:
         if (tokenStream.peekToken() == TOK_COLON) {
             if (!checkYieldNameValidity())