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

Unified Diff: third_party/WebKit/Source/wtf/StdLibExtras.h

Issue 2652723002: Ensure DEFINE_STATIC_LOCAL can be used before wtf threading is initialized (Closed)
Patch Set: 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 | « no previous file | third_party/WebKit/Source/wtf/Threading.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/StdLibExtras.h
diff --git a/third_party/WebKit/Source/wtf/StdLibExtras.h b/third_party/WebKit/Source/wtf/StdLibExtras.h
index 4a9ca69300d543541bd90d6f6a35d359bd29e9b8..26ba1d8d02958298aacfc73daea5743ccbbce201 100644
--- a/third_party/WebKit/Source/wtf/StdLibExtras.h
+++ b/third_party/WebKit/Source/wtf/StdLibExtras.h
@@ -43,13 +43,14 @@ class WTF_EXPORT StaticLocalVerifier {
public:
StaticLocalVerifier()
: m_safelyInitialized(WTF::isBeforeThreadCreated()),
- m_thread(WTF::currentThread()) {}
+ m_thread(WTF::internal::currentThreadSyscall()) {}
bool isNotRacy() {
// Make sure that this 1) is safely initialized, 2) keeps being called
// on the same thread, or 3) is called within
// AtomicallyInitializedStatic (i.e. with a lock held).
- return m_safelyInitialized || m_thread == WTF::currentThread() ||
+ return m_safelyInitialized ||
+ m_thread == WTF::internal::currentThreadSyscall() ||
WTF::isAtomicallyInitializedStaticMutexLockHeld();
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/Threading.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698