Ignore:
Timestamp:
Dec 2, 2009, 10:25:58 PM (15 years ago)
Author:
[email protected]
Message:

Add zombies to JSC
https://bugs.webkit.org/show_bug.cgi?id=32103

Reviewed by Gavin Barraclough.

Add a compile time flag to make the JSC collector replace "unreachable"
objects with zombie objects. The zombie object is a JSCell subclass that
ASSERTs on any attempt to use the JSCell methods. In addition there are
a number of additional assertions in bottleneck code to catch zombie usage
as quickly as possible.

Grrr. Argh. Brains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSCell.h

    r49955 r51624  
    4343        friend class JSValue;
    4444        friend class JSAPIValueWrapper;
     45        friend class JSZombie;
    4546        friend struct VPtrSet;
    4647
     
    9192
    9293        virtual void markChildren(MarkStack&);
     94#if ENABLE(JSC_ZOMBIES)
     95        virtual bool isZombie() const { return false; }
     96#endif
    9397
    9498        // Object operations, with the toObject operation included.
     
    343347        return cellBlock(c)->heap;
    344348    }
    345 
     349   
     350#if ENABLE(JSC_ZOMBIES)
     351    inline bool JSValue::isZombie() const
     352    {
     353        return isCell() && asCell() && asCell()->isZombie();
     354    }
     355#endif
    346356} // namespace JSC
    347357
Note: See TracChangeset for help on using the changeset viewer.