diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index c1e165db5..bbdffa064 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -757,7 +757,15 @@ ParserBase::reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumb } template <> -bool +inline bool +Parser::abortIfSyntaxParser() +{ + handler.disableSyntaxParser(); + return true; +} + +template <> +inline bool Parser::abortIfSyntaxParser() { abortedSyntaxParse = true; @@ -4524,14 +4532,6 @@ Parser::arrayBindingPattern(DeclarationKind kind, YieldHandling yi return literal; } -template <> -bool -Parser::checkDestructuringAssignmentPattern(Node pattern, - PossibleError* possibleError /* = nullptr */) -{ - return abortIfSyntaxParser(); -} - template typename ParseHandler::Node Parser::destructuringDeclaration(DeclarationKind kind, YieldHandling yieldHandling,