rem: if (!localFoldersToDownloadTo) localFoldersToDownloadTo = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);  var index = localFoldersToDownloadTo.GetIndexOf(inboxFolder); if (index == -1) { localFoldersToDownloadTo.AppendElement(inboxFolder); index = pop3DownloadServersArray.length pop3DownloadServersArray[index] = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); pop3DownloadServersArray[index].AppendElement(currentServer); } else { pop3DownloadServersArray[index].AppendElement(currentServer); } 
context: function MsgGetMessagesForAllServers(defaultServer){    // now log into any server    try    {        var allServers = accountManager.allServers;        var firstPop3DownloadServer;        // these arrays are parallel        var pop3DownloadServersArray = new Array; // array of isupportsarrays of servers for a particular folder        var localFoldersToDownloadTo; // isupports array of folders to download to...        for (var i=0;i<allServers.Count();i++)        {            var currentServer = allServers.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgIncomingServer);            var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + currentServer.type].getService(Components.interfaces.nsIMsgProtocolInfo);            if (protocolinfo.canLoginAtStartUp && currentServer.loginAtStartUp)            {                if (defaultServer && defaultServer.equals(currentServer))                {                    //dump(currentServer.serverURI + "...skipping, already opened\n");                }                else                {                    if (currentServer.type == "pop3" && currentServer.downloadOnBiff)                    {                      var outNumFolders = new Object();                      var inboxFolder = currentServer.rootMsgFolder.getFoldersWithFlag(0x1000, 1, outNumFolders);                       pop3Server = currentServer.QueryInterface(Components.interfaces.nsIPop3IncomingServer);                      if (!localFoldersToDownloadTo)                        localFoldersToDownloadTo = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);                      // coalesce the servers that download into the same folder...                      var index = localFoldersToDownloadTo.GetIndexOf(inboxFolder);                      if (index == -1)                      {                        localFoldersToDownloadTo.AppendElement(inboxFolder);                        index = pop3DownloadServersArray.length                        pop3DownloadServersArray[index] = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);                        pop3DownloadServersArray[index].AppendElement(currentServer);                      }                      else                      {                        pop3DownloadServersArray[index].AppendElement(currentServer);                      }                    }                    else                    // Check to see if there are new messages on the server                    currentServer.PerformBiff(msgWindow);                }            }        }        for (var i = 0; i < pop3DownloadServersArray.length; i++)        {          // any ol' pop3Server will do - the serversArray specifies which servers to download from          pop3Server.downloadMailFromServers(pop3DownloadServersArray[i], msgWindow, localFoldersToDownloadTo.GetElementAt(i), null);        }    }    catch(ex)    {        dump(ex + "\n");    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/17abd2c887a8d505772bfb88ee62fa8fb0fa6d15/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js