Bug 878293 - Remove Parser::init, cleanup parse maps pool, r=waldo.

This commit is contained in:
Brian Hackett
2013-06-04 15:53:29 -06:00
parent 7c2d8c5747
commit 95eb597fdf
14 changed files with 40 additions and 106 deletions

View File

@@ -131,8 +131,6 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain,
Parser<FullParseHandler> parser(cx, options, chars, length, /* foldConstants = */ true,
options.canLazilyParse ? &syntaxParser.ref() : NULL, NULL);
if (!parser.init())
return NULL;
parser.sct = sct;
GlobalSharedContext globalsc(cx, scopeChain, StrictModeFromContext(cx));
@@ -329,8 +327,6 @@ frontend::CompileLazyFunction(JSContext *cx, HandleFunction fun, LazyScript *laz
Parser<FullParseHandler> parser(cx, options, chars, length,
/* foldConstants = */ true, NULL, lazy);
if (!parser.init())
return false;
RootedObject enclosingScope(cx, lazy->parent()->function());
@@ -402,8 +398,6 @@ frontend::CompileFunctionBody(JSContext *cx, MutableHandleFunction fun, CompileO
Parser<FullParseHandler> parser(cx, options, chars, length, /* foldConstants = */ true,
options.canLazilyParse ? &syntaxParser.ref() : NULL, NULL);
if (!parser.init())
return false;
parser.sct = &sct;
JS_ASSERT(fun);