Ignore:
Timestamp:
Oct 5, 2015, 4:31:53 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 leak was VM shutdown, which happens in workers.

The fix is for CodeBlockSet to participate in lastChanceToFinalize,
since it's responsible for running CodeBlock destructors.

I ran the leaks tests locally and did not see any CodeBlock-related leaks.

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/bytecode/InlineCallFrame.h

    r190546 r190589  
    3030#include "CodeBlockHash.h"
    3131#include "CodeOrigin.h"
    32 #include "Executable.h"
    3332#include "ValueRecovery.h"
    3433#include "WriteBarrier.h"
     
    4342struct InlineCallFrame;
    4443class ExecState;
    45 class ScriptExecutable;
    4644class JSFunction;
    4745
     
    175173   
    176174    Vector<ValueRecovery> arguments; // Includes 'this'.
    177     WriteBarrier<ScriptExecutable> executable;
     175    WriteBarrier<CodeBlock> baselineCodeBlock;
    178176    ValueRecovery calleeRecovery;
    179177    CodeOrigin directCaller;
     
    210208    CString hashAsStringIfPossible() const;
    211209   
    212     CodeBlock* baselineCodeBlock() const;
    213    
    214210    void setStackOffset(signed offset)
    215211    {
     
    220216    ptrdiff_t callerFrameOffset() const { return stackOffset * sizeof(Register) + CallFrame::callerFrameOffset(); }
    221217    ptrdiff_t returnPCOffset() const { return stackOffset * sizeof(Register) + CallFrame::returnPCOffset(); }
     218
     219    bool isStrictMode() const { return baselineCodeBlock->isStrictMode(); }
    222220
    223221    void dumpBriefFunctionInformation(PrintStream&) const;
     
    232230{
    233231    RELEASE_ASSERT(inlineCallFrame);
    234     ScriptExecutable* executable = inlineCallFrame->executable.get();
    235     RELEASE_ASSERT(executable->structure()->classInfo() == FunctionExecutable::info());
    236     return static_cast<FunctionExecutable*>(executable)->baselineCodeBlockFor(inlineCallFrame->specializationKind());
     232    return inlineCallFrame->baselineCodeBlock.get();
    237233}
    238234
Note: See TracChangeset for help on using the changeset viewer.