Ignore:
Timestamp:
Oct 2, 2015, 2:16:20 PM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling back in r190450
https://bugs.webkit.org/show_bug.cgi?id=149727

The cause of the crash was a CodeBlock, after surviving a call to
deleteAllCode by virtue of being in the remembered set, trying to mark
its inlined CodeBlocks via pointers from its inlined executables.
Since deleteAllCode clears those pointers, the CodeBlock would ASSERT.
(Any other choice to retain a CodeBlock after deleteAllCode -- for
example, conservative marking -- could trigger the same bug.)

The fix is for InlineCallFrame to point directly to its inlined CodeBlock
instead of pointing indirectly via an executable. This guarantees that
CodeBlocks are GC safe regardless of whether we've called deleteAllCode.

Restored changesets:

"CodeBlock should be a GC object"
https://bugs.webkit.org/show_bug.cgi?id=149727
http://trac.webkit.org/changeset/190450

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITToDFGDeferredCompilationCallback.cpp

    r190453 r190522  
    4444
    4545void JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously(
    46     CodeBlock* codeBlock)
     46    CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock)
    4747{
     48    ASSERT_UNUSED(profiledDFGCodeBlock, !profiledDFGCodeBlock);
    4849    ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
    4950   
     
    5556
    5657void JITToDFGDeferredCompilationCallback::compilationDidComplete(
    57     CodeBlock* codeBlock, CompilationResult result)
     58    CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationResult result)
    5859{
     60    ASSERT(!profiledDFGCodeBlock);
    5961    ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
    6062   
     
    6769    codeBlock->alternative()->setOptimizationThresholdBasedOnCompilationResult(result);
    6870
    69     DeferredCompilationCallback::compilationDidComplete(codeBlock, result);
     71    DeferredCompilationCallback::compilationDidComplete(codeBlock, profiledDFGCodeBlock, result);
    7072}
    7173
Note: See TracChangeset for help on using the changeset viewer.