mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 10:07:30 +09:00
[security] Hold mutex when accessing TSI fields.
This commit is contained in:
parent
8a55eab0f0
commit
ef29cca224
1 changed files with 6 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ NS_IMPL_ISUPPORTS(TransportSecurityInfo,
|
||||||
nsresult
|
nsresult
|
||||||
TransportSecurityInfo::SetHostName(const char* host)
|
TransportSecurityInfo::SetHostName(const char* host)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mHostName.Adopt(host ? NS_strdup(host) : 0);
|
mHostName.Adopt(host ? NS_strdup(host) : 0);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -103,6 +104,7 @@ nsresult
|
||||||
TransportSecurityInfo::SetOriginAttributes(
|
TransportSecurityInfo::SetOriginAttributes(
|
||||||
const NeckoOriginAttributes& aOriginAttributes)
|
const NeckoOriginAttributes& aOriginAttributes)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mOriginAttributes = aOriginAttributes;
|
mOriginAttributes = aOriginAttributes;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +138,7 @@ TransportSecurityInfo::GetSecurityState(uint32_t* state)
|
||||||
nsresult
|
nsresult
|
||||||
TransportSecurityInfo::SetSecurityState(uint32_t aState)
|
TransportSecurityInfo::SetSecurityState(uint32_t aState)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mSecurityState = aState;
|
mSecurityState = aState;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -152,6 +155,7 @@ NS_IMETHODIMP
|
||||||
TransportSecurityInfo::SetCountSubRequestsBrokenSecurity(
|
TransportSecurityInfo::SetCountSubRequestsBrokenSecurity(
|
||||||
int32_t aSubRequestsBrokenSecurity)
|
int32_t aSubRequestsBrokenSecurity)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mSubRequestsBrokenSecurity = aSubRequestsBrokenSecurity;
|
mSubRequestsBrokenSecurity = aSubRequestsBrokenSecurity;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -168,6 +172,7 @@ NS_IMETHODIMP
|
||||||
TransportSecurityInfo::SetCountSubRequestsNoSecurity(
|
TransportSecurityInfo::SetCountSubRequestsNoSecurity(
|
||||||
int32_t aSubRequestsNoSecurity)
|
int32_t aSubRequestsNoSecurity)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mSubRequestsNoSecurity = aSubRequestsNoSecurity;
|
mSubRequestsNoSecurity = aSubRequestsNoSecurity;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -515,6 +520,7 @@ TransportSecurityInfo::GetSSLStatus(nsISSLStatus** _result)
|
||||||
nsresult
|
nsresult
|
||||||
TransportSecurityInfo::SetSSLStatus(nsSSLStatus *aSSLStatus)
|
TransportSecurityInfo::SetSSLStatus(nsSSLStatus *aSSLStatus)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mMutex);
|
||||||
mSSLStatus = aSSLStatus;
|
mSSLStatus = aSSLStatus;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue