• oliver@apple.com's avatar
    Add some hardening to methodTable() · b6b94a90
    oliver@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=108253
    
    Reviewed by Mark Hahnenberg.
    
    When accessing methodTable() we now always make sure that our
    structure _could_ be valid.  Added a separate method to get a
    classes methodTable during destruction as it's not possible to
    validate the structure at that point.  This separation might
    also make it possible to improve the performance of methodTable
    access more generally in future.
    
    * heap/MarkedBlock.cpp:
    (JSC::MarkedBlock::callDestructor):
    * runtime/JSCell.h:
    (JSCell):
    * runtime/JSCellInlines.h:
    (JSC::JSCell::methodTableForDestruction):
    (JSC):
    (JSC::JSCell::methodTable):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b6b94a90
JSCell.h 7.17 KB