예제 #1
0
 void operator()(JSCell* cell)
 {
     if (!cell->inherits(&FunctionExecutable::s_info))
         return;
     FunctionExecutable* executable = static_cast<FunctionExecutable*>(cell);
     if (currentlyExecutingFunctions.contains(executable))
         return;
     executable->discardCode();
 }
예제 #2
0
파일: Heap.cpp 프로젝트: Moondee/Artemis
void Heap::discardAllCompiledCode()
{
    // If JavaScript is running, it's not safe to recompile, since we'll end
    // up throwing away code that is live on the stack.
    if (m_globalData->dynamicGlobalObject)
        return;

    for (FunctionExecutable* current = m_functions.head(); current; current = current->next())
        current->discardCode();
}