| 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 a8228fce72e0e288153d3311b0ea25875cfe92b0..5b7011c600479cbfad2f906e75ceefd493cc7daf 100644
|
| --- a/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| +++ b/third_party/WebKit/Source/wtf/WTFThreadData.h
|
| @@ -55,6 +55,9 @@ class WTF_EXPORT WTFThreadData {
|
|
|
| ThreadIdentifier threadId() const { return m_threadId; }
|
|
|
| + // Must be called on the main thread before any callers to wtfThreadData().
|
| + static void initialize();
|
| +
|
| #if OS(WIN) && COMPILER(MSVC)
|
| static size_t threadStackSize();
|
| #endif
|
| @@ -74,10 +77,7 @@ class WTF_EXPORT WTFThreadData {
|
| };
|
|
|
| inline WTFThreadData& wtfThreadData() {
|
| - // WTFThreadData is used on main thread before it could possibly be used
|
| - // on secondary ones, so there is no need for synchronization here.
|
| - if (!WTFThreadData::staticData)
|
| - WTFThreadData::staticData = new ThreadSpecific<WTFThreadData>;
|
| + DCHECK(WTFThreadData::staticData);
|
| return **WTFThreadData::staticData;
|
| }
|
|
|
|
|