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

Side by Side Diff: third_party/WebKit/Source/wtf/ThreadingWin.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 StringImpl::empty16Bit(); 154 StringImpl::empty16Bit();
155 atomicallyInitializedStaticMutex = new Mutex; 155 atomicallyInitializedStaticMutex = new Mutex;
156 wtfThreadData(); 156 wtfThreadData();
157 initializeDates(); 157 initializeDates();
158 // Force initialization of static DoubleToStringConverter converter variable 158 // Force initialization of static DoubleToStringConverter converter variable
159 // inside EcmaScriptConverter function while we are in single thread mode. 159 // inside EcmaScriptConverter function while we are in single thread mode.
160 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); 160 double_conversion::DoubleToStringConverter::EcmaScriptConverter();
161 } 161 }
162 162
163 ThreadIdentifier currentThread() { 163 ThreadIdentifier currentThread() {
164 return internal::currentThreadSyscall(); 164 return wtfThreadData().threadId();
165 } 165 }
166 166
167 MutexBase::MutexBase(bool recursive) { 167 MutexBase::MutexBase(bool recursive) {
168 m_mutex.m_recursionCount = 0; 168 m_mutex.m_recursionCount = 0;
169 InitializeCriticalSection(&m_mutex.m_internalMutex); 169 InitializeCriticalSection(&m_mutex.m_internalMutex);
170 } 170 }
171 171
172 MutexBase::~MutexBase() { 172 MutexBase::~MutexBase() {
173 DeleteCriticalSection(&m_mutex.m_internalMutex); 173 DeleteCriticalSection(&m_mutex.m_internalMutex);
174 } 174 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 void willCreateThread() { 412 void willCreateThread() {
413 s_threadCreated = true; 413 s_threadCreated = true;
414 } 414 }
415 #endif 415 #endif
416 416
417 } // namespace WTF 417 } // namespace WTF
418 418
419 #endif // OS(WIN) 419 #endif // OS(WIN)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingPthreads.cpp ('k') | third_party/WebKit/Source/wtf/WTFThreadData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698