Bug 887549 - Don't handle destructuring shorthand in syntax parser, r=jandem.

This commit is contained in:
Brian Hackett 2013-07-08 07:08:15 -06:00
parent 96eb6d7022
commit 3e59abea5d

View File

@ -6624,6 +6624,8 @@ Parser<ParseHandler>::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();