void operator()(JSCell* cell)
 {
     if (!cell->inherits(&FunctionExecutable::s_info))
         return;
     FunctionExecutable* executable = static_cast<FunctionExecutable*>(cell);
     if (currentlyExecutingFunctions.contains(executable))
         return;
     executable->discardCode();
 }
Example #2
0
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();
}