diff --git a/webrtc/base/criticalsection.h b/webrtc/base/criticalsection.h index 0b4bb1505..1891f83bb 100644 --- a/webrtc/base/criticalsection.h +++ b/webrtc/base/criticalsection.h @@ -105,9 +105,13 @@ class LOCKABLE CriticalSection { #endif // CS_TRACK_OWNER } // Use only for DCHECKing. + bool IsLocked() { #if CS_TRACK_OWNER - bool IsLocked() { return thread_ != 0; } + return thread_ != 0; +#else + return true; #endif + } private: pthread_mutex_t mutex_;