Ignore:
Timestamp:
Jan 14, 2009, 2:14:55 PM (16 years ago)
Author:
[email protected]
Message:

Bug 22903: REGRESSION (r36267): visiting this site reliably crashes WebKit nightly

Reviewed by Cameron Zwarich

EvalCodeBlock's do not reference the functions that are declared inside the eval
code, this means that simply marking the EvalCodeBlock through the global object
is insufficient to mark the declared functions. This patch corrects this by
explicitly marking the CodeBlocks of all the functions declared in the cached
EvalNode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Nodes.cpp

    r39851 r39910  
    24032403}
    24042404
     2405void ScopeNodeData::mark()
     2406{
     2407    FunctionStack::iterator end = m_functionStack.end();
     2408    for (FunctionStack::iterator ptr = m_functionStack.begin(); ptr != end; ++ptr) {
     2409        FunctionBodyNode* body = (*ptr)->body();
     2410        if (!body->isGenerated())
     2411            continue;
     2412        body->generatedBytecode().mark();
     2413    }
     2414}
     2415
    24052416// ------------------------------ ScopeNode -----------------------------
    24062417
     
    25332544}
    25342545
     2546void EvalNode::mark()
     2547{
     2548    // We don't need to mark our own CodeBlock as the JSGlobalObject takes care of that
     2549    data()->mark();
     2550}
     2551
    25352552// ------------------------------ FunctionBodyNode -----------------------------
    25362553
Note: See TracChangeset for help on using the changeset viewer.