mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 672892 - CloneLeftHandSide should not also clone the right-hand side. Well sure it sounds obvious when you write it out like that. r=dvander.
--HG-- extra : rebase_source : cfcaf1f4c681fc67fd70d20818bdccf5183cde94
This commit is contained in:
parent
4ca39c776b
commit
6c668d27a8
@ -4967,14 +4967,16 @@ CloneLeftHandSide(JSParseNode *opn, JSTreeContext *tc)
|
||||
|
||||
pn->pn_link = dn->dn_uses;
|
||||
dn->dn_uses = pn;
|
||||
} else if (opn->pn_defn) {
|
||||
/* We copied some definition-specific state into pn. Clear it out. */
|
||||
} else {
|
||||
pn->pn_expr = NULL;
|
||||
pn->pn_cookie.makeFree();
|
||||
pn->pn_dflags &= ~PND_BOUND;
|
||||
pn->pn_defn = false;
|
||||
if (opn->pn_defn) {
|
||||
/* We copied some definition-specific state into pn. Clear it out. */
|
||||
pn->pn_cookie.makeFree();
|
||||
pn->pn_dflags &= ~PND_BOUND;
|
||||
pn->pn_defn = false;
|
||||
|
||||
LinkUseToDef(pn, (JSDefinition *) opn, tc);
|
||||
LinkUseToDef(pn, (JSDefinition *) opn, tc);
|
||||
}
|
||||
}
|
||||
return pn;
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ script regress-646820-3.js
|
||||
script regress-665355.js
|
||||
script regress-666599.js
|
||||
script regress-667047.js
|
||||
script regress-672892.js
|
||||
script regress-673070-1.js
|
||||
script regress-673070-2.js
|
||||
script regress-673070-3.js
|
||||
|
8
js/src/tests/js1_8_5/regress/regress-672892.js
Normal file
8
js/src/tests/js1_8_5/regress/regress-672892.js
Normal file
@ -0,0 +1,8 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
with (0)
|
||||
for (var b = 0 in 0) // don't assert in parser
|
||||
;
|
||||
|
||||
reportCompare(0, 0, 'ok');
|
Loading…
Reference in New Issue
Block a user