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

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

Issue 2623273007: Fast path for ThreadSpecific for main thread on TLS-slow platforms (Closed)
Patch Set: [WIP] Fast path for currentThread() for main thread on TLS-slow platforms 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
Index: third_party/WebKit/Source/wtf/ThreadingWin.cpp
diff --git a/third_party/WebKit/Source/wtf/ThreadingWin.cpp b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
index f8d87f820ca48c1ab946eba4cf8ed911404f72de..6f328ef1f558f2a45f90d09e860c8db0fe2fa65b 100644
--- a/third_party/WebKit/Source/wtf/ThreadingWin.cpp
+++ b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
@@ -147,13 +147,13 @@ void unlockAtomicallyInitializedStaticMutex() {
void initializeThreading() {
// This should only be called once.
DCHECK(!atomicallyInitializedStaticMutex);
+ WTFThreadData::initialize();
// StringImpl::empty() does not construct its static string in a threadsafe
// fashion, so ensure it has been initialized from here.
StringImpl::empty();
StringImpl::empty16Bit();
atomicallyInitializedStaticMutex = new Mutex;
- wtfThreadData();
initializeDates();
// Force initialization of static DoubleToStringConverter converter variable
// inside EcmaScriptConverter function while we are in single thread mode.
@@ -161,7 +161,7 @@ void initializeThreading() {
}
ThreadIdentifier currentThread() {
- return internal::currentThreadSyscall();
+ return WTFThreadData::current().threadId();
}
MutexBase::MutexBase(bool recursive) {

Powered by Google App Engine
This is Rietveld 408576698