Index: third_party/WebKit/Source/wtf/WTFThreadData.cpp |
diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.cpp b/third_party/WebKit/Source/wtf/WTFThreadData.cpp |
index af0e33cf7796b3b1515d282b3d563d0d8729e500..26062ae3e776a5f6be943be2eeaf37299125f3c7 100644 |
--- a/third_party/WebKit/Source/wtf/WTFThreadData.cpp |
+++ b/third_party/WebKit/Source/wtf/WTFThreadData.cpp |
@@ -41,6 +41,14 @@ WTFThreadData::WTFThreadData() |
WTFThreadData::~WTFThreadData() {} |
+void WTFThreadData::initialize() { |
+ // WTFThreadData is used on main thread before it could possibly be used |
esprehn
2017/02/02 23:24:51
You can remove this comment now. It's per thread a
Charlie Harrison
2017/02/02 23:35:38
Done.
|
+ // on secondary ones, so there is no need for synchronization here. |
+ DCHECK(!WTFThreadData::staticData); |
+ WTFThreadData::staticData = new ThreadSpecific<WTFThreadData>; |
+ wtfThreadData(); |
+} |
+ |
#if OS(WIN) && COMPILER(MSVC) |
size_t WTFThreadData::threadStackSize() { |
// Needed to bootstrap WTFThreadData on Windows, because this value is needed |