Bug 759498: fix defaults when arguments are bound as functions, r=jorendorff

This commit is contained in:
Benjamin Peterson
2012-06-02 20:16:24 +02:00
parent 08e25a3daf
commit 95a623f2d6
8 changed files with 196 additions and 126 deletions

View File

@@ -289,6 +289,13 @@ frontend::CompileFunctionBody(JSContext *cx, JSFunction *fun,
fn->pn_body = NULL;
fn->pn_cookie.makeFree();
ParseNode *argsbody = ListNode::create(PNK_ARGSBODY, &parser);
if (!argsbody)
return false;
argsbody->setOp(JSOP_NOP);
argsbody->makeEmpty();
fn->pn_body = argsbody;
unsigned nargs = fun->nargs;
if (nargs) {
/*