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

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

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 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/ThreadingPthreads.cpp
diff --git a/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp b/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
index ad67ccf1c6d82b7c5f5753fd8e6dbddccb420f89..89968862a34bec6ae148e64018b24f4eb18496de 100644
--- a/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
+++ b/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
@@ -105,7 +105,7 @@ MutexBase::MutexBase(bool recursive) {
&attr, recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL);
int result = pthread_mutex_init(&m_mutex.m_internalMutex, &attr);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
#if ENABLE(ASSERT)
m_mutex.m_recursionCount = 0;
#endif
@@ -115,12 +115,12 @@ MutexBase::MutexBase(bool recursive) {
MutexBase::~MutexBase() {
int result = pthread_mutex_destroy(&m_mutex.m_internalMutex);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
}
void MutexBase::lock() {
int result = pthread_mutex_lock(&m_mutex.m_internalMutex);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
#if ENABLE(ASSERT)
++m_mutex.m_recursionCount;
#endif
@@ -132,7 +132,7 @@ void MutexBase::unlock() {
--m_mutex.m_recursionCount;
#endif
int result = pthread_mutex_unlock(&m_mutex.m_internalMutex);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
}
// There is a separate tryLock implementation for the Mutex and the
@@ -184,7 +184,7 @@ ThreadCondition::~ThreadCondition() {
void ThreadCondition::wait(MutexBase& mutex) {
PlatformMutex& platformMutex = mutex.impl();
int result = pthread_cond_wait(&m_condition, &platformMutex.m_internalMutex);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
#if ENABLE(ASSERT)
++platformMutex.m_recursionCount;
#endif
@@ -217,12 +217,12 @@ bool ThreadCondition::timedWait(MutexBase& mutex, double absoluteTime) {
void ThreadCondition::signal() {
int result = pthread_cond_signal(&m_condition);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
}
void ThreadCondition::broadcast() {
int result = pthread_cond_broadcast(&m_condition);
- ASSERT_UNUSED(result, !result);
+ DCHECK_EQ(result, 0);
}
#if ENABLE(ASSERT)

Powered by Google App Engine
This is Rietveld 408576698