Add missing null-checks to a couple places in object literal parsing. No bug, r=efaust over IRL

--HG--
extra : rebase_source : ea8de3ea8f72dddc94fbdae1bb6410d8d99823f2
This commit is contained in:
Jeff Walden 2015-02-10 13:58:27 -08:00
parent 42fca0a2e0
commit 168f4ee387

View File

@ -7917,6 +7917,8 @@ Parser<ParseHandler>::objectLiteral()
if (!atom)
return null();
propname = newNumber(tokenStream.currentToken());
if (!propname)
return null();
break;
case TOK_LB: {
@ -8072,6 +8074,8 @@ Parser<ParseHandler>::objectLiteral()
if (!propname)
return null();
Node ident = identifierName();
if (!ident)
return null();
if (!handler.addPropertyDefinition(literal, propname, ident, true))
return null();
} else if (tt == TOK_LP) {