Bug 1885529 - Also update nsHostResolver::mActiveAnyThreadCount in CompleteLookupByTypeLocked when resolving via native DNS r=necko-reviewers,jesup
The issue here is only obvious on Windows, when network.dns.get-ttl=true and network.dns.native_https_query=true. GetTTL will cause another resolution to happen with a low priority, but these don't get picked up unless mActiveAnyThreadCount < MaxResolverThreadsAnyPriority() This causes the DNS_NATIVE_QUEUING probe to increase since these queries don't get picked up immediately. Also decrementing mActiveAnyThreadCount for ByType records makes sure it always has the correct value. Differential Revision: https://phabricator.services.mozilla.com/D206498
This commit is contained in:
@@ -1673,6 +1673,15 @@ nsHostResolver::LookupStatus nsHostResolver::CompleteLookupByTypeLocked(
|
||||
MOZ_ASSERT(rec->pb == pb);
|
||||
MOZ_ASSERT(!rec->IsAddrRecord());
|
||||
|
||||
if (rec->LoadNative()) {
|
||||
// If this was resolved using the native resolver
|
||||
// we also need to update the global count.
|
||||
if (rec->LoadUsingAnyThread()) {
|
||||
mActiveAnyThreadCount--;
|
||||
rec->StoreUsingAnyThread(false);
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<TypeHostRecord> typeRec = do_QueryObject(rec);
|
||||
MOZ_ASSERT(typeRec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user