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 33abb350ad6961e7e70fada3cb27683297d177f4..af0e33cf7796b3b1515d282b3d563d0d8729e500 100644 |
--- a/third_party/WebKit/Source/wtf/WTFThreadData.cpp |
+++ b/third_party/WebKit/Source/wtf/WTFThreadData.cpp |
@@ -26,6 +26,7 @@ |
#include "wtf/WTFThreadData.h" |
+#include "wtf/StackUtil.h" |
#include "wtf/text/AtomicStringTable.h" |
#include "wtf/text/TextCodecICU.h" |
@@ -40,4 +41,18 @@ WTFThreadData::WTFThreadData() |
WTFThreadData::~WTFThreadData() {} |
+#if OS(WIN) && COMPILER(MSVC) |
+size_t WTFThreadData::threadStackSize() { |
+ // Needed to bootstrap WTFThreadData on Windows, because this value is needed |
+ // before the main thread data is fully initialized. |
+ if (!WTFThreadData::staticData->isSet()) |
+ return internal::threadStackSize(); |
+ |
+ WTFThreadData& data = wtfThreadData(); |
+ if (!data.m_threadStackSize) |
+ data.m_threadStackSize = internal::threadStackSize(); |
+ return data.m_threadStackSize; |
+} |
+#endif |
+ |
} // namespace WTF |