Ignore:
Timestamp:
Oct 13, 2008, 2:41:40 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-10-13 Sam Weinig <[email protected]>

Reviewed by Dan Bernstein.

Fix for https://bugs.webkit.org/show_bug.cgi?id=21577
5 false positive StructureID leaks

  • Add leak ignore set to StructureID to selectively ignore leaking some StructureIDs.
  • Add create method to JSGlolalData to be used when the data will be intentionally leaked and ignore all leaks caused the StructureIDs stored in it.
  • JavaScriptCore.exp:
  • kjs/JSGlobalData.cpp: (JSC::JSGlobalData::createLeaked):
  • kjs/JSGlobalData.h:
  • kjs/StructureID.cpp: (JSC::StructureID::StructureID): (JSC::StructureID::~StructureID): (JSC::StructureID::startIgnoringLeaks): (JSC::StructureID::stopIgnoringLeaks):
  • kjs/StructureID.h:

WebCore:

2008-10-13 Sam Weinig <[email protected]>

Reviewed by Dan Bernstein.

Fix for https://bugs.webkit.org/show_bug.cgi?id=21577
5 false positive StructureID leaks

In WebCore, we intentionally leak the common JSGlobalData which in turn
leaks 5 StructureIDs. Use the new JSGlobalData::createLeaked in order to
ignore the StructureIDs leaked within.

  • bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSGlobalData.cpp

    r37323 r37563  
    147147}
    148148
     149PassRefPtr<JSGlobalData> JSGlobalData::createLeaked()
     150{
     151#ifndef NDEBUG
     152    StructureID::startIgnoringLeaks();
     153    RefPtr<JSGlobalData> data = create();
     154    StructureID::stopIgnoringLeaks();
     155    return data.release();
     156#else
     157    return create();
     158#endif
     159}
     160
    149161bool JSGlobalData::sharedInstanceExists()
    150162{
Note: See TracChangeset for help on using the changeset viewer.