| Index: third_party/WebKit/Source/wtf/WTFThreadData.h
|
| diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.h b/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| index 0dbd7e7c6baad8383340a53c35bf04bf1b21fec1..4e541352a886844a4aa625106cf709096e98402c 100644
|
| --- a/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| +++ b/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| @@ -40,14 +40,14 @@ namespace WTF {
|
| class AtomicStringTable;
|
| struct ICUConverterWrapper;
|
|
|
| -typedef void (*AtomicStringTableDestructor)(AtomicStringTable*);
|
| -
|
| class WTF_EXPORT WTFThreadData {
|
| WTF_MAKE_NONCOPYABLE(WTFThreadData);
|
| public:
|
| WTFThreadData();
|
| ~WTFThreadData();
|
|
|
| + static void createData();
|
| +
|
| AtomicStringTable* atomicStringTable()
|
| {
|
| return m_atomicStringTable;
|
| @@ -57,25 +57,16 @@ public:
|
|
|
| private:
|
| AtomicStringTable* m_atomicStringTable;
|
| - AtomicStringTableDestructor m_atomicStringTableDestructor;
|
| OwnPtr<ICUConverterWrapper> m_cachedConverterICU;
|
|
|
| - static ThreadSpecific<WTFThreadData>* staticData;
|
| + static ThreadSpecific<WTFThreadData>* s_staticData;
|
| friend WTFThreadData& wtfThreadData();
|
| - friend class AtomicStringTable;
|
| };
|
|
|
| inline WTFThreadData& wtfThreadData()
|
| {
|
| - // WRT WebCore:
|
| - // WTFThreadData is used on main thread before it could possibly be used
|
| - // on secondary ones, so there is no need for synchronization here.
|
| - // WRT JavaScriptCore:
|
| - // wtfThreadData() is initially called from initializeThreading(), ensuring
|
| - // this is initially called in a pthread_once locked context.
|
| - if (!WTFThreadData::staticData)
|
| - WTFThreadData::staticData = new ThreadSpecific<WTFThreadData>;
|
| - return **WTFThreadData::staticData;
|
| + ASSERT(WTFThreadData::s_staticData);
|
| + return **WTFThreadData::s_staticData;
|
| }
|
|
|
| } // namespace WTF
|
|
|