Permalink
Browse files

Fix leaks in Executable and subclasses

  • Loading branch information...
1 parent 743d775 commit 442465b4d6b39c28824d8055e73edb70bf16a4d6 @mrobinson mrobinson committed Oct 19, 2013
Showing with 2 additions and 15 deletions.
  1. +0 −8 Source/JavaScriptCore/runtime/Executable.cpp
  2. +2 −7 Source/JavaScriptCore/runtime/Executable.h
View
8 Source/JavaScriptCore/runtime/Executable.cpp
@@ -42,21 +42,17 @@ namespace JSC {
const ClassInfo ExecutableBase::s_info = { "Executable", 0, 0, 0, CREATE_METHOD_TABLE(ExecutableBase) };
-#if ENABLE(JIT)
void ExecutableBase::destroy(JSCell* cell)
{
static_cast<ExecutableBase*>(cell)->ExecutableBase::~ExecutableBase();
}
-#endif
void ExecutableBase::clearCode()
{
-#if ENABLE(JIT)
m_jitCodeForCall.clear();
m_jitCodeForConstruct.clear();
m_jitCodeForCallWithArityCheck = MacroAssemblerCodePtr();
m_jitCodeForConstructWithArityCheck = MacroAssemblerCodePtr();
-#endif
m_numParametersForCall = NUM_PARAMETERS_NOT_COMPILED;
m_numParametersForConstruct = NUM_PARAMETERS_NOT_COMPILED;
}
@@ -77,12 +73,10 @@ Intrinsic ExecutableBase::intrinsic() const
const ClassInfo NativeExecutable::s_info = { "NativeExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(NativeExecutable) };
-#if ENABLE(JIT)
void NativeExecutable::destroy(JSCell* cell)
{
static_cast<NativeExecutable*>(cell)->NativeExecutable::~NativeExecutable();
}
-#endif
#if ENABLE(DFG_JIT)
Intrinsic NativeExecutable::intrinsic() const
@@ -107,12 +101,10 @@ static void jettisonCodeBlock(VM& vm, RefPtr<T>& codeBlock)
const ClassInfo ScriptExecutable::s_info = { "ScriptExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(ScriptExecutable) };
-#if ENABLE(JIT)
void ScriptExecutable::destroy(JSCell* cell)
{
static_cast<ScriptExecutable*>(cell)->ScriptExecutable::~ScriptExecutable();
}
-#endif
const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(EvalExecutable) };
View
9 Source/JavaScriptCore/runtime/Executable.h
@@ -85,12 +85,10 @@ namespace JSC {
public:
typedef JSCell Base;
-#if ENABLE(JIT)
static const bool needsDestruction = true;
static const bool hasImmortalStructure = true;
static void destroy(JSCell*);
-#endif
-
+
CodeBlockHash hashFor(CodeSpecializationKind) const;
bool isFunctionExecutable()
@@ -287,9 +285,7 @@ namespace JSC {
}
#endif
-#if ENABLE(JIT)
static void destroy(JSCell*);
-#endif
CodeBlockHash hashFor(CodeSpecializationKind) const;
@@ -365,9 +361,8 @@ namespace JSC {
{
}
-#if ENABLE(JIT)
static void destroy(JSCell*);
-#endif
+
CodeBlockHash hashFor(CodeSpecializationKind) const;

0 comments on commit 442465b

Please sign in to comment.