Changeset 54866 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Feb 16, 2010, 8:06:48 PM (15 years ago)
Author:
[email protected]
Message:

Fix a handful of leaks seen on the buildbot.

Reviewed by Gavin Barraclough.

  • runtime/UStringImpl.h:

(JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete
to ensure that the rope's fibers are also destroyed.

File:
1 edited

Legend:

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

    r54843 r54866  
    341341    unsigned m_fiberCount;
    342342    Fiber m_fibers[1];
     343
     344    friend class UStringOrRopeImpl;
    343345};
    344346
     
    348350    if (!(m_refCountAndFlags & s_refCountMask)) {
    349351        if (isRope())
    350             delete static_cast<URopeImpl*>(this);
     352            static_cast<URopeImpl*>(this)->destructNonRecursive();
    351353        else if (!s_refCountFlagStatic)
    352354            delete static_cast<UStringImpl*>(this);
Note: See TracChangeset for help on using the changeset viewer.