X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fbase%2Fsynchronization%2Fcondition_variable_posix.cc;h=013284c888f72993b81a75f0b56a28bd653e6e3a;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=8492a01fbc56add4847fdb4f6f93c966610b6c6e;hpb=42dcc1327bbd3f24706b73963db769f667a58196;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/base/synchronization/condition_variable_posix.cc b/src/base/synchronization/condition_variable_posix.cc index 8492a01..013284c 100644 --- a/src/base/synchronization/condition_variable_posix.cc +++ b/src/base/synchronization/condition_variable_posix.cc @@ -16,7 +16,7 @@ namespace base { ConditionVariable::ConditionVariable(Lock* user_lock) : user_mutex_(user_lock->lock_.native_handle()) -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) , user_lock_(user_lock) #endif { @@ -48,12 +48,12 @@ ConditionVariable::~ConditionVariable() { void ConditionVariable::Wait() { base::ThreadRestrictions::AssertWaitAllowed(); -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) user_lock_->CheckHeldAndUnmark(); #endif int rv = pthread_cond_wait(&condition_, user_mutex_); DCHECK_EQ(0, rv); -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) user_lock_->CheckUnheldAndMark(); #endif } @@ -66,7 +66,7 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) { relative_time.tv_nsec = (usecs % Time::kMicrosecondsPerSecond) * Time::kNanosecondsPerMicrosecond; -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) user_lock_->CheckHeldAndUnmark(); #endif @@ -104,7 +104,7 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) { #endif // OS_MACOSX DCHECK(rv == 0 || rv == ETIMEDOUT); -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) user_lock_->CheckUnheldAndMark(); #endif }