VariableEnvironmentNode should inherit from ParserArenaDeletable because VariableEnvironment's must have their destructors run
https://bugs.webkit.org/show_bug.cgi?id=149359
Reviewed by Andreas Kling.
VariableEnvironment must have its destructor run.
Therefore, VariableEnvironmentNode should inherit from ParserArenaDeletable.
Also, anything that inherits from VariableEnvironmentNode must use
ParserArenaDeletable's operator new. Also, any other nodes that own
a VariableEnvironment must also have their destructors run.
* parser/Nodes.h:
(JSC::VariableEnvironmentNode::VariableEnvironmentNode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@190014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index 48647a3..a3e5f56 100644
--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -2850,13 +2850,13 @@
tryData = generator.pushTry(here.get());
}
- generator.emitPushCatchScope(m_thrownValueIdent, thrownValueRegister.get(), m_catchEnvironment);
+ generator.emitPushCatchScope(m_thrownValueIdent, thrownValueRegister.get(), m_lexicalVariables);
generator.emitProfileControlFlow(m_tryBlock->endOffset() + 1);
if (m_finallyBlock)
generator.emitNode(dst, m_catchBlock);
else
generator.emitNodeInTailPosition(dst, m_catchBlock);
- generator.emitPopCatchScope(m_catchEnvironment);
+ generator.emitPopCatchScope(m_lexicalVariables);
generator.emitLabel(catchEndLabel.get());
}