mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1061853 - Remove a stale bit of code dealing with the parsing of shorthands in destructuring assignment object patterns as not being done by identifierName() (they are now). r=shu
--HG-- extra : rebase_source : b8de5cacd646f0f4ca70179c9fa673291157807d
This commit is contained in:
parent
12717b8699
commit
fa909fc010
@ -3062,17 +3062,6 @@ Parser<FullParseHandler>::checkDestructuringObject(BindData<FullParseHandler> *d
|
||||
}
|
||||
ok = bindDestructuringVar(data, expr);
|
||||
} else {
|
||||
/*
|
||||
* If this is a destructuring shorthand ({x} = ...), then
|
||||
* identifierName wasn't used to parse |x|. As a result, |x|
|
||||
* hasn't been officially linked to its def or registered in
|
||||
* lexdeps. Do that now.
|
||||
*/
|
||||
if (!member->isKind(PNK_MUTATEPROTO) && member->pn_right == member->pn_left) {
|
||||
RootedPropertyName name(context, expr->pn_atom->asPropertyName());
|
||||
if (!noteNameUse(name, expr))
|
||||
return false;
|
||||
}
|
||||
ok = checkAndMarkAsAssignmentLhs(expr, KeyedDestructuringAssignment);
|
||||
}
|
||||
if (!ok)
|
||||
|
Loading…
Reference in New Issue
Block a user