Bug 627332 - add-ons compatibility check always presents "Minefield is working offline" dialog when network link state detection is disabled. r=roc a=dolske
authorFrank Yan <fyan@mozilla.com>
Thu, 27 Jan 2011 16:07:30 -0800
changeset 61419 b5b1e065bc0ebca21a13a89d87cefc9b945e6d67
parent 61418 81d830ef76fd06057743a10395993de9e89d24f2
child 61420 037c029a23293be181cdeaa1d637c068d71c65ee
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersroc, dolske
bugs627332
milestone2.0b11pre
Bug 627332 - add-ons compatibility check always presents "Minefield is working offline" dialog when network link state detection is disabled. r=roc a=dolske
netwerk/base/src/nsIOService.cpp
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -263,25 +263,25 @@ nsIOService::Init()
     gIOService = this;
 
 #ifdef MOZ_IPC
     // go into managed mode if we can, and chrome process
     if (XRE_GetProcessType() == GeckoProcessType_Default)
 #endif
         mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID);
 
-    if (!mNetworkLinkService) {
-        mManageOfflineStatus = PR_FALSE;
+    if (!mNetworkLinkService)
         // We can't really determine if the machine has a usable network connection,
         // so let's cross our fingers!
-        SetOffline(PR_FALSE);
-    }
+        mManageOfflineStatus = PR_FALSE;
 
     if (mManageOfflineStatus)
         TrackNetworkLinkStatusForOffline();
+    else
+        SetOffline(PR_FALSE);
     
     NS_TIME_FUNCTION_MARK("Set up network link service");
 
     return NS_OK;
 }
 
 
 nsIOService::~nsIOService()