Missed an init() in c6857d0b1e9f
authorLuke Wagner <lw@mozilla.com>
Sat, 01 May 2010 13:32:10 -0700
changeset 41868 4e1ffc10dfa235c3a525f5a308e9a530943b52ea
parent 41867 c6857d0b1e9f078c9eab48f96572f1f01a5bf33a
child 41869 5ce43332610384bf404ddcb839a8f98258cf14ef
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone1.9.3a5pre
Missed an init() in c6857d0b1e9f
js/src/jsparse.cpp
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -1524,16 +1524,19 @@ Compiler::compileFunctionBody(JSContext 
                      &cx->scriptStackQuota);
     JS_InitArenaPool(&notePool, "note", 1024, sizeof(jssrcnote),
                      &cx->scriptStackQuota);
 
     Parser &parser = compiler.parser;
     TokenStream &tokenStream = parser.tokenStream;
 
     JSCodeGenerator funcg(&parser, &codePool, &notePool, tokenStream.getLineno());
+    if (!funcg.init())
+        return NULL;
+
     funcg.flags |= TCF_IN_FUNCTION;
     funcg.fun = fun;
     if (!GenerateBlockId(&funcg, funcg.bodyid))
         return NULL;
 
     /* FIXME: make Function format the source for a function definition. */
     tokenStream.mungeCurrentToken(TOK_NAME);
     JSParseNode *fn = FunctionNode::create(&funcg);