Ignore:
Timestamp:
Sep 6, 2011, 7:05:02 PM (14 years ago)
Author:
[email protected]
Message:

Accessibility tests crashing in BasicRawSentinelNode code
https://bugs.webkit.org/show_bug.cgi?id=67682

Reviewed by Geoffrey Garen.

A CodeBlock should ensure that no other CodeBlocks have references to it after
it is destroyed.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r94616 r94623  
    14491449#endif
    14501450   
    1451     // We should not be garbage collected if there are incoming calls. But
    1452     // if this is called during heap destruction, then there may still be
    1453     // incoming calls, which is harmless.
     1451    // We may be destroyed before any CodeBlocks that refer to us are destroyed.
     1452    // Consider that two CodeBlocks become unreachable at the same time. There
     1453    // is no guarantee about the order in which the CodeBlocks are destroyed.
     1454    // So, if we don't remove incoming calls, and get destroyed before the
     1455    // CodeBlock(s) that have calls into us, then the CallLinkInfo vector's
     1456    // destructor will try to remove nodes from our (no longer valid) linked list.
     1457    while (m_incomingCalls.begin() != m_incomingCalls.end())
     1458        m_incomingCalls.begin()->remove();
    14541459   
    14551460    // Note that our outgoing calls will be removed from other CodeBlocks'
Note: See TracChangeset for help on using the changeset viewer.