diff --git a/src/sync.h b/src/sync.h index a4c22f67cc7..43473534db0 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() {} };