Bug 1847260 - use diagnostic assertions to validate nsITransportSecurityInfo refactoring r=jschanck

Differential Revision: https://phabricator.services.mozilla.com/D185581
This commit is contained in:
Dana Keeler 2023-08-07 17:42:11 +00:00
parent 183a888a39
commit 695c711b20
2 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ CommonSocketControl::CommonSocketControl(const nsCString& aHostName,
mResumed(false),
mIsBuiltCertChainRootBuiltInRoot(false),
mPeerId() {
#ifdef DEBUG
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
mOwningThread = PR_GetCurrentThread();
#endif
}

View file

@ -15,10 +15,10 @@
#include "nsITLSSocketControl.h"
#include "nsSocketTransportService2.h"
#ifdef DEBUG
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
# include "prthread.h"
# define COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD() \
MOZ_ASSERT(mOwningThread == PR_GetCurrentThread())
MOZ_DIAGNOSTIC_ASSERT(mOwningThread == PR_GetCurrentThread())
#else
# define COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD() \
do { \
@ -183,7 +183,7 @@ class CommonSocketControl : public nsITLSSocketControl {
bool mIsBuiltCertChainRootBuiltInRoot;
nsCString mPeerId;
#ifdef DEBUG
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
const PRThread* mOwningThread;
#endif
};