Fixed GC-leakage for FunctionObjects.

git-svn-id: svn://10.0.0.236/trunk@139793 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2003-03-19 21:29:47 +00:00
parent 98478763d3
commit 900de6cf01
2 changed files with 7 additions and 4 deletions

View File

@@ -76,6 +76,8 @@ namespace MetaData {
FunctionExprNode *fnExpr = parser.parseFunctionExpression(meta->engine->errorPos());
ASSERT(parser.lexer.peek(true).hasKind(Token::end));
ASSERT(fnExpr); // otherwise, an exception would have been thrown out of here
fnExpr->obj = NULL;
RootKeeper rk(&fnExpr->obj);
JS2Class *exprType;
meta->ValidateExpression(&meta->cxt, meta->env, fnExpr);
meta->SetupExprNode(meta->env, RunPhase, fnExpr, &exprType);