rem: var allFolders = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); rootFolder.ListDescendents(allFolders); var numFolders = allFolders.Count(); for (var folderIndex = 0; folderIndex < numFolders; folderIndex++) uriSearchString = processSearchSettingForFolder(allFolders.GetElementAt(folderIndex).QueryInterface(Components.interfaces.nsIMsgFolder), uriSearchString); } } 
add: var allFolders = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); rootFolder.ListDescendents(allFolders); var numFolders = allFolders.Count(); for (var folderIndex = 0; folderIndex < numFolders; folderIndex++) uriSearchString = processSearchSettingForFolder(allFolders.GetElementAt(folderIndex).QueryInterface(Components.interfaces.nsIMsgFolder), uriSearchString); } 
context: function generateFoldersToSearchList(){  var uriSearchString = "";  var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);  var allServers = accountManager.allServers;  var numServers = allServers.Count();  for (var index = 0; index < numServers; index++)  {    var rootFolder  = allServers.GetElementAt(index).QueryInterface(Components.interfaces.nsIMsgIncomingServer).rootFolder;    if (rootFolder)    {      uriSearchString = processSearchSettingForFolder(rootFolder, uriSearchString);      var allFolders = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);      rootFolder.ListDescendents(allFolders);      var numFolders = allFolders.Count();      for (var folderIndex = 0; folderIndex < numFolders; folderIndex++)        uriSearchString = processSearchSettingForFolder(allFolders.GetElementAt(folderIndex).QueryInterface(Components.interfaces.nsIMsgFolder), uriSearchString);    }  } // for each account  return uriSearchString;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/40ce15f164caa7555b6d78338586c545f64847a7/virtualFolderListDialog.js/buggy/mailnews/base/resources/content/virtualFolderListDialog.js