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

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

Issue 2524653002: Replace ASSERT with DCHECK in wtf/Threading* (Closed)
Patch Set: Created 4 years, 1 month 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/ThreadingPthreads.cpp ('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/ThreadingWin.cpp
diff --git a/third_party/WebKit/Source/wtf/ThreadingWin.cpp b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
index 8df017dd2a54e074ac5d9485d09b0fbed2de1d45..d2f9ff5c7190acc01f8d2c0ee72a6eba939f9347 100644
--- a/third_party/WebKit/Source/wtf/ThreadingWin.cpp
+++ b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
@@ -128,7 +128,7 @@ typedef struct tagTHREADNAME_INFO {
static Mutex* atomicallyInitializedStaticMutex;
void lockAtomicallyInitializedStaticMutex() {
- ASSERT(atomicallyInitializedStaticMutex);
+ DCHECK(atomicallyInitializedStaticMutex);
atomicallyInitializedStaticMutex->lock();
}
@@ -138,7 +138,7 @@ void unlockAtomicallyInitializedStaticMutex() {
void initializeThreading() {
// This should only be called once.
- ASSERT(!atomicallyInitializedStaticMutex);
+ DCHECK(!atomicallyInitializedStaticMutex);
// StringImpl::empty() does not construct its static string in a threadsafe
// fashion, so ensure it has been initialized from here.
@@ -171,7 +171,7 @@ void MutexBase::lock() {
}
void MutexBase::unlock() {
- ASSERT(m_mutex.m_recursionCount);
+ DCHECK(m_mutex.m_recursionCount);
--m_mutex.m_recursionCount;
LeaveCriticalSection(&m_mutex.m_internalMutex);
}
@@ -389,7 +389,7 @@ DWORD absoluteTimeToWaitTimeoutInterval(double absoluteTime) {
return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0);
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
static bool s_threadCreated = false;
bool isAtomicallyInitializedStaticMutexLockHeld() {
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingPthreads.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698