Skip to content
  • ggaren@apple.com's avatar
    Weak pointer finalization should be lazy · b816d751
    ggaren@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=87599
    
    Reviewed by Darin Adler.
    
    * heap/Heap.cpp:
    (JSC::Heap::collect): Don't force immediate finalization -- it will
    happen lazily.
    
    * heap/MarkedBlock.cpp:
    (JSC::MarkedBlock::sweep): Sweep a block's weak set when sweeping the
    block. The weak set may not have been swept yet, and this is our last
    chance to run weak finalizers before we recycle the memory they reference.
    
    * heap/MarkedBlock.h:
    * heap/MarkedSpace.cpp:
    (JSC::MarkedBlock::sweepWeakSets):
    * heap/MarkedSpace.h:
    (JSC::MarkedSpace::sweepWeakSets): Nixed sweepWeakSets because it's unused
    now.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b816d751