diff --git a/src/sync.h b/src/sync.h index a4c22f67c..43473534d 100644 --- a/src/sync.h +++ b/src/sync.h @@ -311,6 +311,9 @@ struct SCOPED_LOCKABLE LockAnnotation template explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex) { +#ifdef DEBUG_LOCKORDER + AssertLockHeld(mutex); +#endif } ~LockAnnotation() UNLOCK_FUNCTION() {} };