Ignore:
Timestamp:
Aug 2, 2013, 2:50:56 PM (12 years ago)
Author:
[email protected]
Message:

DFG validation can cause assertion failures due to dumping
https://bugs.webkit.org/show_bug.cgi?id=119456

Reviewed by Geoffrey Garen.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::hasHash):
(JSC::CodeBlock::isSafeToComputeHash):
(JSC::CodeBlock::hash):
(JSC::CodeBlock::dumpAssumingJITType):

  • bytecode/CodeBlock.h:
File:
1 edited

Legend:

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

    r153460 r153671  
    8484}
    8585
     86bool CodeBlock::hasHash() const
     87{
     88    return !!m_hash;
     89}
     90
     91bool CodeBlock::isSafeToComputeHash() const
     92{
     93    return !isCompilationThread();
     94}
     95
    8696CodeBlockHash CodeBlock::hash() const
    8797{
    8898    if (!m_hash) {
    89         RELEASE_ASSERT(!isCompilationThread());
     99        RELEASE_ASSERT(isSafeToComputeHash());
    90100        m_hash = CodeBlockHash(ownerExecutable()->source(), specializationKind());
    91101    }
     
    118128void CodeBlock::dumpAssumingJITType(PrintStream& out, JITCode::JITType jitType) const
    119129{
    120     out.print(inferredName(), "#", hash(), ":[", RawPointer(this), "->", RawPointer(ownerExecutable()), ", ", jitType, codeType());
     130    if (hasHash() || isSafeToComputeHash())
     131        out.print(inferredName(), "#", hash(), ":[", RawPointer(this), "->", RawPointer(ownerExecutable()), ", ", jitType, codeType());
     132    else
     133        out.print(inferredName(), "#<no-hash>:[", RawPointer(this), "->", RawPointer(ownerExecutable()), ", ", jitType, codeType());
     134
    121135    if (codeType() == FunctionCode)
    122136        out.print(specializationKind());
Note: See TracChangeset for help on using the changeset viewer.