diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/Executable.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/Executable.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp index ea40447e4..934533c46 100644 --- a/Source/JavaScriptCore/runtime/Executable.cpp +++ b/Source/JavaScriptCore/runtime/Executable.cpp @@ -146,6 +146,8 @@ FunctionExecutable::FunctionExecutable(JSGlobalData& globalData, const Identifie , m_name(name) , m_inferredName(inferredName.isNull() ? globalData.propertyNames->emptyIdentifier : inferredName) , m_symbolTable(0) + , m_next(0) + , m_prev(0) { } @@ -157,6 +159,8 @@ FunctionExecutable::FunctionExecutable(ExecState* exec, const Identifier& name, , m_name(name) , m_inferredName(inferredName.isNull() ? exec->globalData().propertyNames->emptyIdentifier : inferredName) , m_symbolTable(0) + , m_next(0) + , m_prev(0) { } @@ -654,7 +658,9 @@ void FunctionExecutable::discardCode() void FunctionExecutable::finalize(JSCell* cell) { - jsCast<FunctionExecutable*>(cell)->clearCode(); + FunctionExecutable* executable = jsCast<FunctionExecutable*>(cell); + Heap::heap(executable)->removeFunctionExecutable(executable); + executable->clearCode(); } inline void FunctionExecutable::clearCode() |