From 3e59abea5d39e0ea163b73babc2ae98bec46ebbb Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Mon, 8 Jul 2013 07:08:15 -0600 Subject: [PATCH] Bug 887549 - Don't handle destructuring shorthand in syntax parser, r=jandem. --- js/src/frontend/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 645f8976cab..fdb359b5f2f 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -6624,6 +6624,8 @@ Parser::primaryExpr(TokenKind tt) * Support, e.g., |var {x, y} = o| as destructuring shorthand * for |var {x: x, y: y} = o|, per proposed JS2/ES4 for JS1.8. */ + if (!abortIfSyntaxParser()) + return null(); tokenStream.ungetToken(); if (!tokenStream.checkForKeyword(atom->charsZ(), atom->length(), NULL, NULL)) return null();