Don't leak the SymbolTable when compiling eval code.
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 09:34:57 +0000 (09:34 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 09:34:57 +0000 (09:34 +0000)
Reviewed by Mark

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/nodes.cpp

index 797f5ff..db610d1 100644 (file)
@@ -1,3 +1,12 @@
+2008-05-22  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Mark.
+
+        Don't leak the SymbolTable when compiling eval code.
+
+        * kjs/nodes.cpp:
+        (KJS::EvalNode::generateCode):
+
 2008-05-22  Simon Hausmann  <hausmann@webkit.org>
 
         Reviewed by Oliver.
index cbb071a..d4eb401 100644 (file)
@@ -5789,8 +5789,8 @@ void EvalNode::generateCode(ScopeChainNode* sc)
     ASSERT(globalObject->isGlobalObject());
     
     m_code.set(new EvalCodeBlock(this, globalObject));
-    
-    CodeGenerator generator(this, globalObject->debugger(), scopeChain, new SymbolTable(), m_code.get(), m_varStack, m_functionStack);
+    SymbolTable symbolTable;
+    CodeGenerator generator(this, globalObject->debugger(), scopeChain, &symbolTable, m_code.get(), m_varStack, m_functionStack);
     generator.generate();
 
     m_children.shrinkCapacity(0);