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/heap/CodeBlockSet.h

    r190546 r190589  
    5252    CodeBlockSet();
    5353    ~CodeBlockSet();
     54
     55    void lastChanceToFinalize();
    5456   
    5557    // Add a CodeBlock. This is only called by CodeBlock constructors.
    56     void add(PassRefPtr<CodeBlock>);
     58    void add(CodeBlock*);
    5759   
    58     // Clear mark bits for certain CodeBlocks depending on the type of collection.
    59     void clearMarksForEdenCollection(const Vector<const JSCell*>&);
    60 
    6160    // Clear all mark bits for all CodeBlocks.
    6261    void clearMarksForFullCollection();
     
    7372    void remove(CodeBlock*);
    7473   
    75     // Trace all marked code blocks. The CodeBlock is free to make use of
    76     // mayBeExecuting.
    77     void traceMarked(SlotVisitor&);
    78 
    7974    // Add all currently executing CodeBlocks to the remembered set to be
    8075    // re-scanned during the next collection.
    81     void rememberCurrentlyExecutingCodeBlocks(Heap*);
     76    void writeBarrierCurrentlyExecutingCodeBlocks(Heap*);
    8277
    8378    // Visits each CodeBlock in the heap until the visitor function returns true
     
    10297
    10398private:
    104     void clearMarksForCodeBlocksInRememberedExecutables(const Vector<const JSCell*>&);
    10599    void promoteYoungCodeBlocks();
    106100
    107     // This is not a set of RefPtr<CodeBlock> because we need to be able to find
    108     // arbitrary bogus pointers. I could have written a thingy that had peek types
    109     // and all, but that seemed like overkill.
    110101    HashSet<CodeBlock*> m_oldCodeBlocks;
    111102    HashSet<CodeBlock*> m_newCodeBlocks;
    112     HashSet<RefPtr<CodeBlock>> m_currentlyExecuting;
    113     HashSet<RefPtr<CodeBlock>> m_remembered;
     103    HashSet<CodeBlock*> m_currentlyExecuting;
    114104};
    115105
Note: See TracChangeset for help on using the changeset viewer.