Skip to content

Commit

Permalink
Bug 1559340 - Make sure NetworkConnectivityService::Init() only gets …
Browse files Browse the repository at this point in the history
…called once r=michal

Differential Revision: https://phabricator.services.mozilla.com/D35000

--HG--
extra : moz-landing-system : lando
  • Loading branch information
valenting committed Jun 24, 2019
1 parent cff8fe1 commit 8c623c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netwerk/base/NetworkConnectivityService.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class NetworkConnectivityService : public nsINetworkConnectivityService,
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER

nsresult Init();
static already_AddRefed<NetworkConnectivityService> GetSingleton();

private:
NetworkConnectivityService() = default;
virtual ~NetworkConnectivityService() = default;

nsresult Init();
// Calls all the check methods
void PerformChecks();

Expand Down
2 changes: 1 addition & 1 deletion netwerk/base/nsIOService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ nsresult nsIOService::InitializeCaptivePortalService() {
->Initialize();
}

// Instantiate and initialize the service
RefPtr<NetworkConnectivityService> ncs =
NetworkConnectivityService::GetSingleton();
ncs->Init();

return NS_OK;
}
Expand Down

0 comments on commit 8c623c2

Please sign in to comment.