Bug 1296814 - Give correct position information to prototype mutation when syntax-parsing. r=arai

--HG--
extra : rebase_source : c83a02756108b82402d269a9fb0901d40069a3f0
This commit is contained in:
Jeff Walden 2016-11-07 15:23:16 -08:00
parent 0d2eccb89a
commit 7f88dac912

View File

@ -9180,8 +9180,7 @@ Parser<ParseHandler>::objectLiteral(YieldHandling yieldHandling, PossibleError*
// __proto__: v mutates [[Prototype]]. Getters, setters,
// method/generator definitions, computed property name
// versions of all of these, and shorthands do not.
uint32_t begin = handler.getPosition(propName).begin;
if (!handler.addPrototypeMutation(literal, begin, propExpr))
if (!handler.addPrototypeMutation(literal, namePos.begin, propExpr))
return null();
} else {
if (!handler.isConstant(propExpr))