Ignore:
Timestamp:
Sep 2, 2010, 5:57:58 AM (15 years ago)
Author:
[email protected]
Message:

2010-09-02 Alexey Proskuryakov <[email protected]>

Reviewed by Oliver Hunt.

https://bugs.webkit.org/show_bug.cgi?id=43230
<rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser

One can't delete a ThreadSpecific object that has data in it. It's not even possible to
enumerate data objects in all threads, much less destroy them from a thread that's destroying
the ThreadSpecific.

  • parser/JSParser.cpp: (JSC::JSParser::JSParser):
  • runtime/JSGlobalData.h:
  • wtf/WTFThreadData.cpp: (WTF::WTFThreadData::WTFThreadData):
  • wtf/WTFThreadData.h: (WTF::WTFThreadData::approximatedStackStart): Moved stack guard tracking from JSGlobalData to WTFThreadData.
  • wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't ever face a situation where we'd want to delete a ThreadSpecific object.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/WTFThreadData.h

    r65021 r66665  
    113113#endif
    114114
     115    char* approximatedStackStart() const
     116    {
     117        return m_approximatedStackStart;
     118    }
     119
    115120private:
    116121    AtomicStringTable* m_atomicStringTable;
     
    129134    friend WTFThreadData& wtfThreadData();
    130135    friend class AtomicStringTable;
     136
     137    char* m_approximatedStackStart;
    131138};
    132139
Note: See TracChangeset for help on using the changeset viewer.