diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-24 10:48:34 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-24 11:08:36 +0000 |
commit | 29271977c9d8bb68ebd7293afa4e53de182f38a0 (patch) | |
tree | 70f99b468084313c4b082778716c51724477eecb /security | |
parent | b2c0fda7753ce19074e17bf6844c6d78026670ed (diff) | |
download | uxp-29271977c9d8bb68ebd7293afa4e53de182f38a0.tar.gz |
[security] Hold mutex when accessing TSI fields.
Diffstat (limited to 'security')
-rw-r--r-- | security/manager/ssl/TransportSecurityInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp index 3f4bf4a904..6badceb880 100644 --- a/security/manager/ssl/TransportSecurityInfo.cpp +++ b/security/manager/ssl/TransportSecurityInfo.cpp @@ -74,6 +74,7 @@ NS_IMPL_ISUPPORTS(TransportSecurityInfo, nsresult TransportSecurityInfo::SetHostName(const char* host) { + MutexAutoLock lock(mMutex); mHostName.Adopt(host ? NS_strdup(host) : 0); return NS_OK; } @@ -103,6 +104,7 @@ nsresult TransportSecurityInfo::SetOriginAttributes( const NeckoOriginAttributes& aOriginAttributes) { + MutexAutoLock lock(mMutex); mOriginAttributes = aOriginAttributes; return NS_OK; } @@ -136,6 +138,7 @@ TransportSecurityInfo::GetSecurityState(uint32_t* state) nsresult TransportSecurityInfo::SetSecurityState(uint32_t aState) { + MutexAutoLock lock(mMutex); mSecurityState = aState; return NS_OK; } @@ -152,6 +155,7 @@ NS_IMETHODIMP TransportSecurityInfo::SetCountSubRequestsBrokenSecurity( int32_t aSubRequestsBrokenSecurity) { + MutexAutoLock lock(mMutex); mSubRequestsBrokenSecurity = aSubRequestsBrokenSecurity; return NS_OK; } @@ -168,6 +172,7 @@ NS_IMETHODIMP TransportSecurityInfo::SetCountSubRequestsNoSecurity( int32_t aSubRequestsNoSecurity) { + MutexAutoLock lock(mMutex); mSubRequestsNoSecurity = aSubRequestsNoSecurity; return NS_OK; } @@ -515,6 +520,7 @@ TransportSecurityInfo::GetSSLStatus(nsISSLStatus** _result) nsresult TransportSecurityInfo::SetSSLStatus(nsSSLStatus *aSSLStatus) { + MutexAutoLock lock(mMutex); mSSLStatus = aSSLStatus; return NS_OK; |