зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1379872 - early initialize ProtocolProxyService; r=bagder
MozReview-Commit-ID: Kv7cVYhmLJn --HG-- extra : rebase_source : e1b89084906f7dfa133a6ba7c0b1c5873571056c
This commit is contained in:
Родитель
02eda46a68
Коммит
ea3834fbff
|
@ -54,6 +54,7 @@
|
|||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/net/CaptivePortalService.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "ReferrerPolicy.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
@ -258,6 +259,7 @@ nsIOService::Init()
|
|||
gIOService = this;
|
||||
|
||||
InitializeNetworkLinkService();
|
||||
InitializeProtocolProxyService();
|
||||
|
||||
SetOffline(false);
|
||||
|
||||
|
@ -336,6 +338,19 @@ nsIOService::InitializeNetworkLinkService()
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsIOService::InitializeProtocolProxyService()
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
// for early-initialization
|
||||
Unused << do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &rv);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsIOService*
|
||||
nsIOService::GetInstance() {
|
||||
if (!gIOService) {
|
||||
|
|
|
@ -136,6 +136,7 @@ private:
|
|||
|
||||
nsresult InitializeSocketTransportService();
|
||||
nsresult InitializeNetworkLinkService();
|
||||
nsresult InitializeProtocolProxyService();
|
||||
|
||||
// consolidated helper function
|
||||
void LookupProxyInfo(nsIURI *aURI, nsIURI *aProxyURI, uint32_t aProxyFlags,
|
||||
|
|
Загрузка…
Ссылка в новой задаче