Title: [97017] trunk/Source/WebCore
- Revision
- 97017
- Author
- [email protected]
- Date
- 2011-10-08 17:24:25 -0700 (Sat, 08 Oct 2011)
Log Message
Make ThreadGlobalData members use OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=69710
Reviewed by Adam Barth.
No functional changes. No new tests required.
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData):
(WebCore::ThreadGlobalData::~ThreadGlobalData):
(WebCore::ThreadGlobalData::destroy):
* platform/ThreadGlobalData.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97016 => 97017)
--- trunk/Source/WebCore/ChangeLog 2011-10-08 23:26:41 UTC (rev 97016)
+++ trunk/Source/WebCore/ChangeLog 2011-10-09 00:24:25 UTC (rev 97017)
@@ -1,3 +1,18 @@
+2011-10-08 Justin Schuh <[email protected]>
+
+ Make ThreadGlobalData members use OwnPtr
+ https://bugs.webkit.org/show_bug.cgi?id=69710
+
+ Reviewed by Adam Barth.
+
+ No functional changes. No new tests required.
+
+ * platform/ThreadGlobalData.cpp:
+ (WebCore::ThreadGlobalData::ThreadGlobalData):
+ (WebCore::ThreadGlobalData::~ThreadGlobalData):
+ (WebCore::ThreadGlobalData::destroy):
+ * platform/ThreadGlobalData.h:
+
2011-10-08 Mark Hahnenberg <[email protected]>
Add static version of JSCell::getConstructData
Modified: trunk/Source/WebCore/platform/ThreadGlobalData.cpp (97016 => 97017)
--- trunk/Source/WebCore/platform/ThreadGlobalData.cpp 2011-10-08 23:26:41 UTC (rev 97016)
+++ trunk/Source/WebCore/platform/ThreadGlobalData.cpp 2011-10-09 00:24:25 UTC (rev 97017)
@@ -58,17 +58,17 @@
#endif
ThreadGlobalData::ThreadGlobalData()
- : m_eventNames(new EventNames)
- , m_threadTimers(new ThreadTimers)
- , m_xmlTypeRegExp(new XMLMIMETypeRegExp)
+ : m_eventNames(adoptPtr(new EventNames))
+ , m_threadTimers(adoptPtr(new ThreadTimers))
+ , m_xmlTypeRegExp(adoptPtr(new XMLMIMETypeRegExp))
#ifndef NDEBUG
, m_isMainThread(isMainThread())
#endif
#if USE(ICU_UNICODE)
- , m_cachedConverterICU(new ICUConverterWrapper)
+ , m_cachedConverterICU(adoptPtr(new ICUConverterWrapper))
#endif
#if PLATFORM(MAC)
- , m_cachedConverterTEC(new TECConverterWrapper)
+ , m_cachedConverterTEC(adoptPtr(new TECConverterWrapper))
#endif
{
// This constructor will have been called on the main thread before being called on
@@ -81,27 +81,21 @@
ThreadGlobalData::~ThreadGlobalData()
{
- destroy();
}
void ThreadGlobalData::destroy()
{
#if PLATFORM(MAC)
- delete m_cachedConverterTEC;
- m_cachedConverterTEC = 0;
+ m_cachedConverterTEC.clear();
#endif
#if USE(ICU_UNICODE)
- delete m_cachedConverterICU;
- m_cachedConverterICU = 0;
+ m_cachedConverterICU.clear();
#endif
- delete m_eventNames;
- m_eventNames = 0;
- delete m_threadTimers;
- m_threadTimers = 0;
- delete m_xmlTypeRegExp;
- m_xmlTypeRegExp = 0;
+ m_eventNames.clear();
+ m_threadTimers.clear();
+ m_xmlTypeRegExp.clear();
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/ThreadGlobalData.h (97016 => 97017)
--- trunk/Source/WebCore/platform/ThreadGlobalData.h 2011-10-08 23:26:41 UTC (rev 97016)
+++ trunk/Source/WebCore/platform/ThreadGlobalData.h 2011-10-09 00:24:25 UTC (rev 97017)
@@ -68,20 +68,20 @@
#endif
private:
- EventNames* m_eventNames;
- ThreadTimers* m_threadTimers;
- XMLMIMETypeRegExp* m_xmlTypeRegExp;
+ OwnPtr<EventNames> m_eventNames;
+ OwnPtr<ThreadTimers> m_threadTimers;
+ OwnPtr<XMLMIMETypeRegExp> m_xmlTypeRegExp;
#ifndef NDEBUG
bool m_isMainThread;
#endif
#if USE(ICU_UNICODE)
- ICUConverterWrapper* m_cachedConverterICU;
+ OwnPtr<ICUConverterWrapper> m_cachedConverterICU;
#endif
#if PLATFORM(MAC)
- TECConverterWrapper* m_cachedConverterTEC;
+ OwnPtr<TECConverterWrapper> m_cachedConverterTEC;
#endif
#if ENABLE(WORKERS)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes