Bug 832094 - make the top-level function ParseNode always be a PNK_FUNCTION (r=jorendorff)
This commit is contained in:
@@ -275,11 +275,12 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions
|
||||
fun->setArgCount(formals.length());
|
||||
|
||||
/* FIXME: make Function format the source for a function definition. */
|
||||
ParseNode *fn = FunctionNode::create(PNK_NAME, &parser);
|
||||
ParseNode *fn = FunctionNode::create(PNK_FUNCTION, &parser);
|
||||
if (!fn)
|
||||
return false;
|
||||
|
||||
fn->pn_body = NULL;
|
||||
fn->pn_funbox = NULL;
|
||||
fn->pn_cookie.makeFree();
|
||||
|
||||
ParseNode *argsbody = ListNode::create(PNK_ARGSBODY, &parser);
|
||||
|
||||
Reference in New Issue
Block a user