mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 780405 - Set the funbox kids in LeaveFunction, so generator expression boxes don't lose them. r=jorendorff
This commit is contained in:
parent
2f1dc96c4c
commit
cb1e061ba7
@ -1097,6 +1097,7 @@ LeaveFunction(ParseNode *fn, Parser *parser, PropertyName *funName = NULL,
|
||||
|
||||
FunctionBox *funbox = fn->pn_funbox;
|
||||
funbox->cxFlags = funtc->sc->cxFlags; // copy all the flags
|
||||
funbox->kids = funtc->functionList;
|
||||
|
||||
if (!tc->topStmt || tc->topStmt->type == STMT_BLOCK)
|
||||
fn->pn_dflags |= PND_BLOCKCHILD;
|
||||
@ -1727,8 +1728,6 @@ Parser::functionDef(HandlePropertyName funName, FunctionType type, FunctionSynta
|
||||
}
|
||||
}
|
||||
|
||||
funbox->kids = funtc.functionList;
|
||||
|
||||
pn->pn_funbox = funbox;
|
||||
pn->setOp(op);
|
||||
pn->pn_body->append(body);
|
||||
|
@ -9,6 +9,7 @@ assertEq(f3()()(), true);
|
||||
// These should be okay.
|
||||
function f4(f=(function () { with (Object) {} }), g=(function () { "use strict"; })) {}
|
||||
function f5(g=(function () { "use strict"; }), f=(function () { with (Object) {} })) {}
|
||||
function f6(f=(function () { return (x for (y in (function g() {}))); })) {}
|
||||
|
||||
assertThrowsInstanceOf(function () {
|
||||
eval("function f(a=delete x) { 'use strict'; }");
|
||||
|
Loading…
Reference in New Issue
Block a user