| Index: src/base/platform/mutex.cc
|
| diff --git a/src/base/platform/mutex.cc b/src/base/platform/mutex.cc
|
| index 8b1e305701ffcc86190b7f53063a2ca5207a3a41..c781260f1f0f7706479424adf1f92f4717c16a2f 100644
|
| --- a/src/base/platform/mutex.cc
|
| +++ b/src/base/platform/mutex.cc
|
| @@ -112,7 +112,7 @@ static V8_INLINE bool TryLockNativeHandle(PCRITICAL_SECTION cs) {
|
|
|
| Mutex::Mutex() {
|
| InitializeNativeHandle(&native_handle_);
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| level_ = 0;
|
| #endif
|
| }
|
| @@ -147,7 +147,7 @@ bool Mutex::TryLock() {
|
|
|
| RecursiveMutex::RecursiveMutex() {
|
| InitializeRecursiveNativeHandle(&native_handle_);
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| level_ = 0;
|
| #endif
|
| }
|
| @@ -161,7 +161,7 @@ RecursiveMutex::~RecursiveMutex() {
|
|
|
| void RecursiveMutex::Lock() {
|
| LockNativeHandle(&native_handle_);
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK_LE(0, level_);
|
| level_++;
|
| #endif
|
| @@ -169,7 +169,7 @@ void RecursiveMutex::Lock() {
|
|
|
|
|
| void RecursiveMutex::Unlock() {
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK_LT(0, level_);
|
| level_--;
|
| #endif
|
| @@ -181,7 +181,7 @@ bool RecursiveMutex::TryLock() {
|
| if (!TryLockNativeHandle(&native_handle_)) {
|
| return false;
|
| }
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK_LE(0, level_);
|
| level_++;
|
| #endif
|
|
|