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

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

Issue 2550403002: Make ifdefs consistent in WebKit/Source/wtf/ . (Closed)
Patch Set: Fixed comment. Created 4 years 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 | 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/StdLibExtras.h
diff --git a/third_party/WebKit/Source/wtf/StdLibExtras.h b/third_party/WebKit/Source/wtf/StdLibExtras.h
index 885f9ddfefeb6986d1271e251d66b59711ec1e8a..8a9a9383d5ae87ecb776ad699dcb04f207d2323a 100644
--- a/third_party/WebKit/Source/wtf/StdLibExtras.h
+++ b/third_party/WebKit/Source/wtf/StdLibExtras.h
@@ -33,7 +33,7 @@
#include "wtf/TypeTraits.h"
#include <cstddef>
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
#include "wtf/Noncopyable.h"
#include "wtf/Threading.h"
@@ -49,8 +49,13 @@ class WTF_EXPORT StaticLocalVerifier {
// 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() ||
- WTF::isAtomicallyInitializedStaticMutexLockHeld();
+ return m_safelyInitialized || m_thread == WTF::currentThread()
+#if DCHECK_IS_ON()
Yuta Kitamura 2016/12/06 09:22:02 We are already within DCHECK_IS_ON block. Why do y
Alexander Alekseev 2016/12/06 09:51:02 Sorry, I first updated this block and then the out
+ || WTF::isAtomicallyInitializedStaticMutexLockHeld();
+#else
+ /* Presubmit check prohibits bare ';'.*/
+ || false;
+#endif
}
private:
@@ -90,7 +95,7 @@ class StaticLocalWrapper<T, true> {
}
};
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
#define DEFINE_STATIC_LOCAL_CHECK_THREADSAFE_ACCESS(Name) \
static StaticLocalVerifier Name##StaticLocalVerifier; \
ASSERT(Name##StaticLocalVerifier.isNotRacy())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698