Bug 1747128: DoH cleanup r=dragana,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D134436
This commit is contained in:
Randell Jesup 2021-12-22 12:48:08 +00:00
parent c716b31cc1
commit 4014400bc7

View File

@ -287,6 +287,7 @@ nsresult ODoHService::UpdateODoHConfigFromURI() {
}
// AsyncOpen succeeded, dismiss the guard.
MutexAutoLock lock(mLock);
guard.release();
mLoader.swap(loader);
return rv;
@ -364,6 +365,7 @@ void ODoHService::ODoHConfigUpdateDone(uint32_t aTTL,
NS_IsMainThread() || TRRService::Get()->IsOnTRRThread());
MOZ_ASSERT_IF(XRE_IsSocketProcess(), NS_IsMainThread());
MutexAutoLock lock(mLock);
mQueryODoHConfigInProgress = false;
mODoHConfigs.reset();
@ -489,6 +491,7 @@ void ODoHService::AppendPendingODoHRequest(ODoH* aRequest) {
NS_IsMainThread() || TRRService::Get()->IsOnTRRThread());
MOZ_ASSERT_IF(XRE_IsSocketProcess(), NS_IsMainThread());
MutexAutoLock lock(mLock);
mPendingRequests.AppendElement(aRequest);
}
@ -497,6 +500,7 @@ bool ODoHService::RemovePendingODoHRequest(ODoH* aRequest) {
NS_IsMainThread() || TRRService::Get()->IsOnTRRThread());
MOZ_ASSERT_IF(XRE_IsSocketProcess(), NS_IsMainThread());
MutexAutoLock lock(mLock);
return mPendingRequests.RemoveElement(aRequest);
}