Bug 1995869: Initialize DNS earlier in IOService init r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D271532
This commit is contained in:
committed by
rjesup@mozilla.com
parent
76fab0dd61
commit
803d5eae39
@@ -262,6 +262,7 @@ static const char* gCallbackPrefsForSocketProcess[] = {
|
||||
"network.lna.address_space.public.override",
|
||||
"network.lna.websocket.enabled",
|
||||
"network.lna.local-network-to-localhost.skip-checks",
|
||||
"network.socket.forcePort",
|
||||
nullptr,
|
||||
};
|
||||
|
||||
@@ -333,6 +334,11 @@ nsresult nsIOService::Init() {
|
||||
|
||||
InitializeNetworkLinkService();
|
||||
InitializeProtocolProxyService();
|
||||
// This is just to start the DNS service to make it fast to get later.
|
||||
// Don't invoke directly since we're already in GetService. RefPtr needed
|
||||
// because already_AddRefed<> doesn't like to be dropped
|
||||
NS_DispatchToCurrentThread(NS_NewRunnableFunction(
|
||||
__func__, []() { RefPtr<nsIDNSService> dns = GetOrInitDNSService(); }));
|
||||
|
||||
SetOffline(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user