rem: if (ioService.offline && !ioService.manageOfflineStatus) { 
add: var managingOffineStatus = false; try { managingOffineStatus = ioService.manageOfflineStatus; } catch (ex) {}  if (ioService.offline && !managingOffineStatus) { 
context:   onProfileStartup: function()  {    debug("onProfileStartup");    var ioService = Components.classes["@mozilla.org/network/io-service;1"]                              .getService(Components.interfaces.nsIIOService2);    if (gStartingUp)    {      gStartingUp = false;      // if checked, the "work offline" checkbox overrides      if (ioService.offline && !ioService.manageOfflineStatus) {        debug("already offline!");        return;      }    }    var prefs = Components.classes["@mozilla.org/preferences-service;1"]                          .getService(Components.interfaces.nsIPrefBranch);    var manageOfflineStatus = prefs.getBoolPref("offline.autoDetect");    gOfflineStartupMode = prefs.getIntPref(kOfflineStartupPref);    if (gOfflineStartupMode == kAlwaysOffline)    {      ioService.manageOfflineStatus = false;      ioService.offline = true;    }    else if (gOfflineStartupMode == kAlwaysOnline)    {      ioService.manageOfflineStatus = manageOfflineStatus;      ioService.offline = false;    }    else if (gOfflineStartupMode == kRememberLastState)    {      var wasOffline = !prefs.getBoolPref("network.online");      ioService.manageOfflineStatus = manageOfflineStatus && !wasOffline;      ioService.offline = wasOffline;            }    else if (gOfflineStartupMode == kAskForOnlineState)    {      var promptService = Components.        classes["@mozilla.org/embedcomp/prompt-service;1"].        getService(Components.interfaces.nsIPromptService);      var bundle = getBundle(kBundleURI);      if (!bundle)        return;      var title = bundle.GetStringFromName("title");      var desc = bundle.GetStringFromName("desc");      var button0Text = bundle.GetStringFromName("workOnline");      var button1Text = bundle.GetStringFromName("workOffline");      var checkVal = {value:0};      var result = promptService.confirmEx(null, title, desc,        (promptService.BUTTON_POS_0 * promptService.BUTTON_TITLE_IS_STRING) +        (promptService.BUTTON_POS_1 * promptService.BUTTON_TITLE_IS_STRING),        button0Text, button1Text, null, null, checkVal);      debug ("result = " + result + "\n");      ioService.manageOfflineStatus = manageOfflineStatus && result != 1;      ioService.offline = result == 1;    }  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/9e2ffa9d46e3c19246b4151f70694c696ab69f58/offlineStartup.js/buggy/mailnews/extensions/offline-startup/js/offlineStartup.js