| 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 41526e2c4752d969ef217f79eadf6c48fdeced38..59dac2f869c64ab45adc9b5d61afcfb5a391748f 100644
|
| --- a/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| +++ b/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| @@ -43,45 +43,42 @@ struct ICUConverterWrapper;
|
| typedef void (*AtomicStringTableDestructor)(AtomicStringTable*);
|
|
|
| class WTF_EXPORT WTFThreadData {
|
| - DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| - WTF_MAKE_NONCOPYABLE(WTFThreadData);
|
| -public:
|
| - WTFThreadData();
|
| - ~WTFThreadData();
|
| + DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| + WTF_MAKE_NONCOPYABLE(WTFThreadData);
|
|
|
| - AtomicStringTable* atomicStringTable()
|
| - {
|
| - return m_atomicStringTable;
|
| - }
|
| + public:
|
| + WTFThreadData();
|
| + ~WTFThreadData();
|
|
|
| - ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU; }
|
| + AtomicStringTable* atomicStringTable() { return m_atomicStringTable; }
|
|
|
| -private:
|
| - AtomicStringTable* m_atomicStringTable;
|
| - AtomicStringTableDestructor m_atomicStringTableDestructor;
|
| - OwnPtr<ICUConverterWrapper> m_cachedConverterICU;
|
| + ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU; }
|
|
|
| - static ThreadSpecific<WTFThreadData>* staticData;
|
| - friend WTFThreadData& wtfThreadData();
|
| - friend class AtomicStringTable;
|
| + private:
|
| + AtomicStringTable* m_atomicStringTable;
|
| + AtomicStringTableDestructor m_atomicStringTableDestructor;
|
| + OwnPtr<ICUConverterWrapper> m_cachedConverterICU;
|
| +
|
| + static ThreadSpecific<WTFThreadData>* 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;
|
| +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;
|
| }
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| using WTF::WTFThreadData;
|
| using WTF::wtfThreadData;
|
|
|
| -#endif // WTFThreadData_h
|
| +#endif // WTFThreadData_h
|
|
|