Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: third_party/WebKit/Source/wtf/WTFThreadData.cpp

Issue 2623273007: Fast path for ThreadSpecific for main thread on TLS-slow platforms (Closed)
Patch Set: haraken revieqw Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698