Final part of Bug 473458 Drop nsIMsgWindow argument from nsIMsgFolder's getMessages and getMsgDatabase functions. r=Neil,sr=bienvenu

This commit is contained in:
Mark Banner 2009-01-22 10:15:14 +00:00
Родитель 454503e7ac
Коммит 2f5ded156e
67 изменённых файлов: 162 добавлений и 171 удалений

Просмотреть файл

@ -232,8 +232,7 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder)
{
try
{
var msgdb = newFolder.getMsgDatabase(msgWindow);
var dbFolderInfo = msgdb.dBFolderInfo;
var dbFolderInfo = newFolder.msgDatabase.dBFolderInfo;
sortType = dbFolderInfo.sortType;
sortOrder = dbFolderInfo.sortOrder;
viewFlags = dbFolderInfo.viewFlags;
@ -298,7 +297,7 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder)
if (!IsSpecialFolder(oldFolder, Components.interfaces.nsMsgFolderFlags.Inbox, false))
{
if (oldFolder.URI != newFolder.URI)
oldFolder.setMsgDatabase(null);
oldFolder.msgDatabase = null;
}
}
// that should have initialized gDBView, now re-root the thread pane
@ -850,7 +849,7 @@ function FolderPaneSelectionChange()
{
try
{
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var msgDatabase = msgFolder.msgDatabase;
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;
@ -886,7 +885,7 @@ function FolderPaneSelectionChange()
// we need to load the db for the actual folder so that many hdrs to download
// will return false...
realFolder = GetMsgFolderFromUri(uriToLoad);
msgDatabase = realFolder.getMsgDatabase(msgWindow);
msgDatabase = realFolder.msgDatabase;
gVirtualFolderTerms = CreateGroupedSearchTerms(tempFilter.searchTerms);
}
}
@ -1014,7 +1013,7 @@ function CreateVirtualFolder(newName, parentFolder, searchFolderURIs, searchTer
var newFolder = parentFolder.addSubfolder(newName);
newFolder.prettyName = newName;
newFolder.setFlag(Components.interfaces.nsMsgFolderFlags.Virtual);
var vfdb = newFolder.getMsgDatabase(msgWindow);
var vfdb = newFolder.msgDatabase;
var searchTermString = getSearchTermString(searchTerms);
var dbFolderInfo = vfdb.dBFolderInfo;
// set the view string as a property of the db folder info

Просмотреть файл

@ -1153,9 +1153,9 @@ let gFolderTreeController = {
folder.throwAlertMsg("operationFailedFolderBusy", msgWindow);
return;
}
folder.getMsgDatabase(msgWindow).summaryValid = false;
folder.msgDatabase.summaryValid = false;
var msgDB = folder.getMsgDatabase(msgWindow);
var msgDB = folder.msgDatabase;
msgDB.summaryValid = false;
try {
folder.closeAndBackupFolderDB("");
@ -1291,7 +1291,7 @@ let gFolderTreeController = {
folder.propagateDelete(iter.getNext(), true, msgWindow);
// Now delete the messages
let iter = fixIterator(folder.getMessages(msgWindow));
let iter = fixIterator(folder.messages);
let messages = [m for each (m in iter)];
let children = toXPCOMArray(messages, Ci.nsIMutableArray);
folder.deleteMessages(children, msgWindow, true, false, null, false);

Просмотреть файл

@ -430,7 +430,7 @@ function SearchForMessageIdInSubFolder(folder, messageId)
// return message header if message was found
function CheckForMessageIdInFolder(folder, messageId)
{
var messageDatabase = folder.getMsgDatabase(msgWindow);
var messageDatabase = folder.msgDatabase;
var messageHeader;
try
@ -448,7 +448,7 @@ function CheckForMessageIdInFolder(folder, messageId)
if (!mailSession.IsFolderOpenInWindow(folder) &&
!(folder.flags & (nsMsgFolderFlags.Trash | nsMsgFolderFlags.Inbox)))
{
folder.setMsgDatabase(null);
folder.msgDatabase = null;
}
return messageHeader;

Просмотреть файл

@ -1906,8 +1906,7 @@
var folderArray = new Array;
if (aFolder.flags & Components.interfaces.nsMsgFolderFlags.Virtual)
{
var msgDatabase = aFolder.getMsgDatabase(null);
var dbFolderInfo = msgDatabase.dBFolderInfo;
var dbFolderInfo = aFolder.msgDatabase.dBFolderInfo;
var srchFolderUri = dbFolderInfo.getCharProperty("searchFolderUri");
var srchFolderUriArray = srchFolderUri.split('|');
var foldersAdded = 0;
@ -1926,8 +1925,8 @@
{
aFolder = folderArray[folderIndex];
// now get the database
var msgDatabase = aFolder.getMsgDatabase(null);
aFolder.setMsgDatabase(null);
var msgDatabase = aFolder.msgDatabase;
aFolder.msgDatabase = null;
var msgKeys = {};
var numMsgKeys = {};
msgDatabase.getNewList(numMsgKeys, msgKeys);
@ -1941,13 +1940,13 @@
// for each of the message keys.
try {
aOutAsync.value = aFolder.fetchMsgPreviewText(msgKeys.value, numMsgKeys.value, false, aUrlListener);
aFolder.setMsgDatabase(null);
aFolder.msgDatabase = null;
}
catch (ex)
{
// fetchMsgPreviewText throws an error when we call it on a news folder, we should just not show
// the tooltip if this method returns an error.
aFolder.setMsgDatabase(null);
aFolder.msgDatabase = null;
continue;
}
}

Просмотреть файл

@ -1645,7 +1645,7 @@ let mailTabType = {
// re-select our message.
ClearThreadPaneSelection();
var msgDB = aTab.msgSelectedFolder.getMsgDatabase(msgWindow);
var msgDB = aTab.msgSelectedFolder.msgDatabase;
var msgHdr = msgDB.getMsgHdrForMessageID(aTab.selectedMsgId);
setTimeout(gDBView.selectFolderMsgByKey, 0, aTab.msgSelectedFolder,
msgHdr.messageKey);
@ -2753,7 +2753,7 @@ function OnMsgLoaded(aUrl)
if (msgHdr && msgHdr.messageId.length > 0)
{
var readMailDB = outputPFC.getMsgDatabase(msgWindow);
var readMailDB = outputPFC.msgDatabase;
if (readMailDB && readMailDB.getMsgHdrForMessageID(msgHdr.messageId))
return; // Don't copy to offline folder.
}
@ -2833,7 +2833,7 @@ function HandleMDNResponse(aUrl)
msgHdr.OrFlags(MSG_FLAG_MDN_REPORT_SENT);
// Commit db changes.
var msgdb = msgFolder.getMsgDatabase(msgWindow);
var msgdb = msgFolder.msgDatabase;
if (msgdb)
msgdb.Commit(ADDR_DB_LARGE_COMMIT);
}

Просмотреть файл

@ -374,7 +374,7 @@ function CreateView(originalView)
}
else if (msgFolder)
{
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var msgDatabase = msgFolder.msgDatabase;
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;
@ -628,7 +628,7 @@ function SelectFolder(folderUri)
{
// accessing the db causes the folder loaded notification to get sent
// for local folders.
var db = msgfolder.getMsgDatabase(msgWindow);
var db = msgfolder.msgDatabase;
msgfolder.startFolderLoading();
msgfolder.updateFolder(msgWindow);
}

Просмотреть файл

@ -263,7 +263,7 @@ var folderListener = {
if (gRerootOnFolderLoad)
RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder);
var db = msgFolder.getMsgDatabase(msgWindow);
var db = msgFolder.msgDatabase;
if (db)
db.resetHdrCacheSize(100);
@ -577,8 +577,7 @@ function IsCurrentLoadedFolder(folder)
var currentLoadedFolder = GetThreadPaneFolder();
if (currentLoadedFolder.flags & Components.interfaces.nsMsgFolderFlags.Virtual)
{
var msgDatabase = currentLoadedFolder.getMsgDatabase(msgWindow);
var dbFolderInfo = msgDatabase.dBFolderInfo;
var dbFolderInfo = currentLoadedFolder.msgDatabase.dBFolderInfo;
var srchFolderUri = dbFolderInfo.getCharProperty("searchFolderUri");
var re = new RegExp("^" + msgfolder.URI + "$|^" + msgfolder.URI + "\||\|" +
msgfolder.URI + "$|\|" + msgfolder.URI +"\|");

Просмотреть файл

@ -107,13 +107,12 @@ var gSearchNotificationListener =
(!gSearchInput || gSearchInput.value == "" || gSearchInput.showingSearchCriteria))
{
var vFolder = GetMsgFolderFromUri(gCurrentVirtualFolderUri, false);
var dbFolderInfo = vFolder.getMsgDatabase(msgWindow).dBFolderInfo;
var dbFolderInfo = vFolder.msgDatabase.dBFolderInfo;
dbFolderInfo.numUnreadMessages = gNumUnreadMessages;
dbFolderInfo.numMessages = gNumTotalMessages;
vFolder.updateSummaryTotals(true); // force update from db.
var msgdb = vFolder.getMsgDatabase(msgWindow);
const MSG_DB_LARGE_COMMIT = 1;
msgdb.Commit(MSG_DB_LARGE_COMMIT);
vFolder.msgDatabase.Commit(MSG_DB_LARGE_COMMIT);
// now that we have finished loading a virtual folder,
// scroll to the correct message if there is at least one.
if (vFolder.getTotalMessages(false) > 0)
@ -354,7 +353,7 @@ function createSearchTermsWithList(aTermsArray)
if (gXFVirtualFolderTerms)
{
var msgDatabase = selectedFolder.getMsgDatabase(msgWindow);
var msgDatabase = selectedFolder.msgDatabase;
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;

Просмотреть файл

@ -168,7 +168,7 @@ let SearchIntegration =
this._msgHdr.setUint32Property(SearchIntegration._hdrIndexedProperty,
1);
folder.getMsgDatabase(null).Commit(MSG_DB_LARGE_COMMIT);
folder.msgDatabase.Commit(MSG_DB_LARGE_COMMIT);
this._message = "";
}

Просмотреть файл

@ -307,7 +307,7 @@ let SearchIntegration =
this._msgHdr.setUint32Property(SearchIntegration._hdrIndexedProperty,
1);
folder.getMsgDatabase(null).Commit(MSG_DB_LARGE_COMMIT);
folder.msgDatabase.Commit(MSG_DB_LARGE_COMMIT);
this._message = "";
SearchIntegration._log.info("Successfully written file");

Просмотреть файл

@ -283,7 +283,7 @@ let SearchSupport =
try
{
if (!this._headerEnumerator)
this._headerEnumerator = this._currentFolderToIndex.getMessages(null);
this._headerEnumerator = this._currentFolderToIndex.messages;
// iterate over the folder finding the next message to index
while (this._headerEnumerator.hasMoreElements())

Просмотреть файл

@ -67,14 +67,15 @@ typedef long nsMsgBiffState;
// enumerated type for determining if a message has been replied to, forwarded, etc.
typedef long nsMsgDispositionState;
[scriptable, uuid(38444311-d7fb-4fbc-a52e-1899320ce1da)]
[scriptable, uuid(f64a0335-2b72-4320-89f6-8d57ac5e70ca)]
interface nsIMsgFolder : nsISupports {
const nsMsgBiffState nsMsgBiffState_NewMail = 0; // User has new mail waiting.
const nsMsgBiffState nsMsgBiffState_NoMail = 1; // No new mail is waiting.
const nsMsgBiffState nsMsgBiffState_Unknown = 2; // We dunno whether there is new mail.
nsISimpleEnumerator getMessages(in nsIMsgWindow aMsgWindow);
/// Returns an enumerator containing the messages within the current database.
readonly attribute nsISimpleEnumerator messages;
void startFolderLoading();
void endFolderLoading();
@ -442,8 +443,8 @@ interface nsIMsgFolder : nsISupports {
* out of date information.
* @see nsIMsgFolder::getDBFolderInfoAndDB.
*/
nsIMsgDatabase getMsgDatabase(in nsIMsgWindow msgWindow);
void setMsgDatabase (in nsIMsgDatabase msgDatabase);
attribute nsIMsgDatabase msgDatabase;
/**
* Get the backup message database, used in reparsing. This database must
* be created first using closeAndBackupFolderDB()

Просмотреть файл

@ -271,8 +271,7 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder)
{
try
{
var msgdb = newFolder.getMsgDatabase(msgWindow);
var dbFolderInfo = msgdb.dBFolderInfo;
var dbFolderInfo = newFolder.msgDatabase.dBFolderInfo;
sortType = dbFolderInfo.sortType;
sortOrder = dbFolderInfo.sortOrder;
viewFlags = dbFolderInfo.viewFlags;
@ -339,7 +338,7 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder)
and performance outweighs footprint */
if (!IsSpecialFolder(oldFolder, nsMsgFolderFlags.Inbox, false))
if (oldFolder.URI != newFolder.URI)
oldFolder.setMsgDatabase(null);
oldFolder.msgDatabase = null;
}
// that should have initialized gDBView, now re-root the thread pane
RerootThreadPane();
@ -821,7 +820,7 @@ function FolderPaneSelectionChange()
{
try
{
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var msgDatabase = msgFolder.msgDatabase;
if (msgDatabase)
{
gSearchSession = null;
@ -859,7 +858,7 @@ function FolderPaneSelectionChange()
// will return false...
var realFolderRes = GetResourceFromUri(uriToLoad);
var realFolder = realFolderRes.QueryInterface(Components.interfaces.nsIMsgFolder);
msgDatabase = realFolder.getMsgDatabase(msgWindow);
msgDatabase = realFolder.msgDatabase;
// dump("search term string = " + searchTermString + "\n");
gVirtualFolderTerms = CreateGroupedSearchTerms(tempFilter.searchTerms);
@ -1022,7 +1021,7 @@ function CreateVirtualFolder(newName, parentFolder, searchFolderURIs, searchTer
{
var newFolder = parentFolder.addSubfolder(newName);
newFolder.setFlag(Components.interfaces.nsMsgFolderFlags.Virtual);
var vfdb = newFolder.getMsgDatabase(msgWindow);
var vfdb = newFolder.msgDatabase;
var searchTermString = getSearchTermString(searchTerms);
var dbFolderInfo = vfdb.dBFolderInfo;
// set the view string as a property of the db folder info

Просмотреть файл

@ -211,7 +211,7 @@ MessageClassifier.prototype =
if (aWhiteListDirectories[abCount].cardForEmailAddress(authorEmailAddress))
{
// message is ham from whitelist
var db = aMsgHdr.folder.getMsgDatabase(msgWindow);
var db = aMsgHdr.folder.msgDatabase;
db.setStringProperty(aMsgHdr.messageKey, "junkscore",
Components.interfaces.nsIJunkMailPlugin.IS_HAM_SCORE);
db.setStringProperty(aMsgHdr.messageKey, "junkscoreorigin", "whitelist");
@ -259,7 +259,7 @@ MessageClassifier.prototype =
// directly) so that the nsMsgDBView knows to update the UI
//
var msgHdr = this.mMessages[aClassifiedMsgURI];
var db = msgHdr.folder.getMsgDatabase(msgWindow);
var db = msgHdr.folder.msgDatabase;
db.setStringProperty(msgHdr.messageKey, "junkscore", score);
db.setStringProperty(msgHdr.messageKey, "junkscoreorigin", "plugin");
db.setStringProperty(msgHdr.messageKey, "junkpercent", aJunkPercent);
@ -423,7 +423,7 @@ function deleteJunkInFolder()
{
var junkMsgHdrs = Components.classes["@mozilla.org/array;1"]
.createInstance(Components.interfaces.nsIMutableArray);
var enumerator = gDBView.msgFolder.getMessages(msgWindow);
var enumerator = gDBView.msgFolder.messages;
while (enumerator.hasMoreElements())
{
var msgHdr = enumerator.getNext().QueryInterface(Components.interfaces.nsIMsgDBHdr);

Просмотреть файл

@ -503,7 +503,7 @@ function deleteAllInFolder(commandName)
.createInstance(Components.interfaces.nsIMutableArray);
// Delete messages.
iter = folder.getMessages(msgWindow);
iter = folder.messages;
while (iter.hasMoreElements()) {
children.appendElement(iter.getNext(), false);
}

Просмотреть файл

@ -780,7 +780,7 @@ function SearchForMessageIdInSubFolder(folder, messageId)
// return message header if message was found
function CheckForMessageIdInFolder(folder, messageId)
{
var messageDatabase = folder.getMsgDatabase(msgWindow);
var messageDatabase = folder.msgDatabase;
var messageHeader;
try
@ -802,7 +802,7 @@ function CheckForMessageIdInFolder(folder, messageId)
if (!gMailSession.IsFolderOpenInWindow(folder) &&
!(folder.flags & (nsMsgFolderFlags.Trash | nsMsgFolderFlags.Inbox)))
{
folder.setMsgDatabase(null);
folder.msgDatabase = null;
}
return messageHeader;

Просмотреть файл

@ -2504,7 +2504,7 @@ function OnMsgLoaded(aUrl)
messageID = msgHdr.messageId;
if (messageID.length > 0)
{
var readMailDB = outputPFC.getMsgDatabase(msgWindow);
var readMailDB = outputPFC.msgDatabase;
if (readMailDB)
{
var hdrInDestDB = readMailDB.getMsgHdrForMessageID(messageID);
@ -2585,7 +2585,7 @@ function HandleMDNResponse(aUrl)
msgHdr.OrFlags(MSG_FLAG_MDN_REPORT_SENT);
// Commit db changes.
var msgdb = msgFolder.getMsgDatabase(msgWindow);
var msgdb = msgFolder.msgDatabase;
if (msgdb)
msgdb.Commit(MSG_DB_LARGE_COMMIT);
}

Просмотреть файл

@ -108,7 +108,7 @@ function markInDatabase( lower, upper )
if ( window.arguments && window.arguments[0] )
{
messageFolder = window.arguments[0];
messageDatabase = messageFolder.getMsgDatabase( null );
messageDatabase = messageFolder.msgDatabase;
}
if ( !messageDatabase )

Просмотреть файл

@ -368,7 +368,7 @@ function CreateView(originalView)
}
else if (msgFolder)
{
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var msgDatabase = msgFolder.msgDatabase;
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;

Просмотреть файл

@ -588,8 +588,7 @@ function IsCurrentLoadedFolder(folder)
var currentLoadedFolder = GetThreadPaneFolder();
if (currentLoadedFolder.flags & Components.interfaces.nsMsgFolderFlags.Virtual)
{
var msgDatabase = currentLoadedFolder.getMsgDatabase(msgWindow);
var dbFolderInfo = msgDatabase.dBFolderInfo;
var dbFolderInfo = currentLoadedFolder.msgDatabase.dBFolderInfo;
var srchFolderUri = dbFolderInfo.getCharProperty("searchFolderUri");
var re = new RegExp("^" + folderURI + "$|^" + folderURI + "\||\|" + folderURI + "$|\|" + folderURI +"\|");
var retval = (currentLoadedFolder.URI.match(re));

Просмотреть файл

@ -91,11 +91,11 @@ var gSearchNotificationListener =
(!gSearchInput || gSearchInput.value == "" || gSearchInput.showingSearchCriteria))
{
var vFolder = GetMsgFolderFromUri(gCurrentVirtualFolderUri, false);
var dbFolderInfo = vFolder.getMsgDatabase(msgWindow).dBFolderInfo;
var dbFolderInfo = vFolder.msgDatabase.dBFolderInfo;
dbFolderInfo.numUnreadMessages = gNumUnreadMessages;
dbFolderInfo.numMessages = gNumTotalMessages;
vFolder.updateSummaryTotals(true); // force update from db.
var msgdb = vFolder.getMsgDatabase(msgWindow);
var msgdb = vFolder.msgDatabase;
msgdb.Commit(MSG_DB_LARGE_COMMIT);
// now that we have finished loading a virtual folder,
// scroll to the correct message if there is at least one.
@ -335,7 +335,7 @@ function createSearchTermsWithList(aTermsArray)
var selectedFolder = GetThreadPaneFolder();
if (gXFVirtualFolderTerms)
{
var msgDatabase = selectedFolder.getMsgDatabase(msgWindow);
var msgDatabase = selectedFolder.msgDatabase;
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;

Просмотреть файл

@ -134,8 +134,7 @@ function InitDialogWithVirtualFolder(aVirtualFolderURI)
folderNameField.disabled = true;
var msgFolder = GetMsgFolderFromUri(aVirtualFolderURI);
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var dbFolderInfo = msgDatabase.dBFolderInfo;
var dbFolderInfo = msgFolder.msgDatabase.dBFolderInfo;
gSearchFolderURIs = dbFolderInfo.getCharProperty("searchFolderUri");
var searchTermString = dbFolderInfo.getCharProperty("searchStr");
@ -186,7 +185,7 @@ function onOK()
var searchTermString = getSearchTermString(gSearchTermSession.searchTerms);
var msgFolder = window.arguments[0].folder;
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var msgDatabase = msgFolder.msgDatabase;
var dbFolderInfo = msgDatabase.dBFolderInfo;
// set the view string as a property of the db folder info

Просмотреть файл

@ -266,7 +266,7 @@ function RebuildSummaryFile(msgFolder)
msgFolder.throwAlertMsg("operationFailedFolderBusy", msgWindow);
return;
}
var msgDB = msgFolder.getMsgDatabase(msgWindow);
var msgDB = msgFolder.msgDatabase;
msgDB.summaryValid = false;
try {
msgFolder.closeAndBackupFolderDB("");

Просмотреть файл

@ -584,8 +584,7 @@
var resource = rdfService.GetResource(identity.stationeryFolder);
var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
var msgWindow = GetFilterEditorMsgWindow();
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
var enumerator = msgDatabase.EnumerateMessages();
var enumerator = msgFolder.msgDatabase.EnumerateMessages();
var templateListPopup = document.getAnonymousNodes(this)[0].menupopup;
if ( enumerator )

Просмотреть файл

@ -828,7 +828,7 @@ nsresult nsMsgSearchOfflineNews::OpenSummaryFile ()
err = m_scope->GetFolder(getter_AddRefs(scopeFolder));
// code here used to check if offline store existed, which breaks offline news.
if (NS_SUCCEEDED(err) && scopeFolder)
err = scopeFolder->GetMsgDatabase(nsnull, getter_AddRefs(m_db));
err = scopeFolder->GetMsgDatabase(getter_AddRefs(m_db));
return err;
}

Просмотреть файл

@ -261,7 +261,7 @@ nsresult nsMessengerBootstrap::OpenMessengerWindowForMessageId(nsCString &folder
NS_ENSURE_SUCCESS(rv, rv);
// once we have the folder uri, open the db and search for the message id.
nsCOMPtr <nsIMsgDatabase> msgDB;
containingFolder->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
containingFolder->GetMsgDatabase(getter_AddRefs(msgDB));
nsCOMPtr<nsIMsgDBHdr> msgHdr;
if (msgDB)
msgDB->GetMsgHdrForMessageID(messageId.get(), getter_AddRefs(msgHdr));

Просмотреть файл

@ -2428,7 +2428,7 @@ VirtualFolderChangeListener::OnHdrPropertyChanged(nsIMsgDBHdr *aHdrChanged, PRBo
PRUint32 flags;
PRBool match;
nsCOMPtr<nsIMsgDatabase> msgDB;
nsresult rv = m_folderWatching->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
nsresult rv = m_folderWatching->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
// we don't want any early returns from this function, until we've
// called ClearScopes on the search session.
@ -2508,7 +2508,7 @@ NS_IMETHODIMP VirtualFolderChangeListener::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrCh
{
nsCOMPtr <nsIMsgDatabase> msgDB;
nsresult rv = m_folderWatching->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
nsresult rv = m_folderWatching->GetMsgDatabase(getter_AddRefs(msgDB));
PRBool oldMatch = PR_FALSE, newMatch = PR_FALSE;
// we don't want any early returns from this function, until we've
// called ClearScopes 0n the search session.
@ -2588,7 +2588,7 @@ NS_IMETHODIMP VirtualFolderChangeListener::OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted
{
nsCOMPtr <nsIMsgDatabase> msgDB;
nsresult rv = m_folderWatching->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
nsresult rv = m_folderWatching->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
PRBool match = PR_FALSE;
m_searchSession->AddScopeTerm(nsMsgSearchScope::offlineMail, m_folderWatching);
@ -2629,7 +2629,7 @@ NS_IMETHODIMP VirtualFolderChangeListener::OnHdrAdded(nsIMsgDBHdr *aNewHdr, nsMs
{
nsCOMPtr <nsIMsgDatabase> msgDB;
nsresult rv = m_folderWatching->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
nsresult rv = m_folderWatching->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
PRBool match = PR_FALSE;
m_searchSession->AddScopeTerm(nsMsgSearchScope::offlineMail, m_folderWatching);
@ -2776,7 +2776,8 @@ NS_IMETHODIMP nsMsgAccountManager::LoadVirtualFolders()
CopyUTF8toUTF16(currentFolderNameCStr, currentFolderNameStr);
nsCOMPtr <nsIMsgFolder> childFolder;
nsCOMPtr <nsIMsgDatabase> db;
virtualFolder->GetMsgDatabase(nsnull, getter_AddRefs(db)); // force db to get created.
// force db to get created.
virtualFolder->GetMsgDatabase(getter_AddRefs(db));
if (db)
rv = db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
else

Просмотреть файл

@ -3670,7 +3670,7 @@ nsMsgDBView::GetLocationCollationKey(nsIMsgDBHdr *msgHdr, PRUint8 **result, PRUi
nsresult rv = msgHdr->GetFolder(getter_AddRefs(folder));
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr <nsIMsgDatabase> dbToUse;
rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(dbToUse));
rv = folder->GetMsgDatabase(getter_AddRefs(dbToUse));
NS_ENSURE_SUCCESS(rv,rv);
nsString locationString;
@ -4501,7 +4501,7 @@ nsMsgDBView::GetIndexForThread(nsIMsgDBHdr *msgHdr)
comparisonContext.isSecondarySort = PR_FALSE;
comparisonContext.ascendingSort = (m_sortOrder == nsMsgViewSortOrder::ascending);
nsCOMPtr <nsIMsgDatabase> hdrDB;
EntryInfo1.folder->GetMsgDatabase(nsnull, getter_AddRefs(hdrDB));
EntryInfo1.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
comparisonContext.db = hdrDB.get();
switch (fieldType)
{
@ -5021,7 +5021,7 @@ nsMsgDBView::GetThreadRootIndex(nsIMsgDBHdr *msgHdr)
comparisonContext.isSecondarySort = PR_FALSE;
comparisonContext.ascendingSort = (m_sortOrder == nsMsgViewSortOrder::ascending);
nsCOMPtr<nsIMsgDatabase> hdrDB;
EntryInfo1.folder->GetMsgDatabase(nsnull, getter_AddRefs(hdrDB));
EntryInfo1.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
comparisonContext.db = hdrDB.get();
switch (fieldType)
{
@ -5145,7 +5145,7 @@ void nsMsgDBView::InitEntryInfoForIndex(nsMsgViewIndex i, IdKeyPtr &EntryInfo)
nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
nsCOMPtr<nsIMsgDatabase> hdrDB;
EntryInfo.folder->GetMsgDatabase(nsnull, getter_AddRefs(hdrDB));
EntryInfo.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
switch (fieldType)
{
case kCollationKey:

Просмотреть файл

@ -236,7 +236,7 @@ nsFolderCompactState::Compact(nsIMsgFolder *folder, PRBool aOfflineStore,
}
else
{
rv=folder->GetMsgDatabase(nsnull, getter_AddRefs(db));
rv = folder->GetMsgDatabase(getter_AddRefs(db));
NS_ENSURE_SUCCESS(rv, rv);
}
rv = folder->GetFilePath(getter_AddRefs(path));
@ -717,7 +717,7 @@ nsFolderCompactState::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
NS_ASSERTION(PR_FALSE, "not an envelope");
// try to mark the db as invalid so it will be reparsed.
nsCOMPtr <nsIMsgDatabase> srcDB;
m_folder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
m_folder->GetMsgDatabase(getter_AddRefs(srcDB));
if (srcDB)
{
srcDB->SetSummaryValid(PR_FALSE);

Просмотреть файл

@ -341,8 +341,7 @@ nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index,
if (folder)
{
nsCOMPtr <nsIMsgDatabase> db;
nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
rv = folder->GetMsgDatabase(msgWindow, getter_AddRefs(db));
rv = folder->GetMsgDatabase(getter_AddRefs(db));
NS_ENSURE_SUCCESS(rv, rv);
if (db)
rv = db->GetMsgHdrForKey(m_keys[index], msgHdr);
@ -364,7 +363,7 @@ nsresult nsMsgSearchDBView::GetDBForViewIndex(nsMsgViewIndex index, nsIMsgDataba
nsCOMPtr <nsIMsgFolder> aFolder;
nsresult rv = GetFolderForViewIndex(index, getter_AddRefs(aFolder));
NS_ENSURE_SUCCESS(rv, rv);
return aFolder->GetMsgDatabase(nsnull, db);
return aFolder->GetMsgDatabase(db);
}
nsresult nsMsgSearchDBView::AddHdrFromFolder(nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder)
@ -1245,7 +1244,7 @@ nsresult nsMsgSearchDBView::GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr,
nsresult rv = msgHdr->GetFolder(getter_AddRefs(folder));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> msgDB;
rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
rv = folder->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
return msgDB->GetThreadContainingMsgHdr(msgHdr, pThread);
}

Просмотреть файл

@ -298,7 +298,7 @@ NS_IMETHODIMP nsMsgXFViewThread::GetChildAt(PRInt32 aIndex, nsIMsgDBHdr **aResul
if (aIndex >= (PRInt32) m_keys.Length())
return NS_MSG_MESSAGE_NOT_FOUND;
nsCOMPtr<nsIMsgDatabase> db;
nsresult rv = m_folders[aIndex]->GetMsgDatabase(nsnull, getter_AddRefs(db));
nsresult rv = m_folders[aIndex]->GetMsgDatabase(getter_AddRefs(db));
NS_ENSURE_SUCCESS(rv, rv);
return db->GetMsgHdrForKey(m_keys[aIndex], aResult);
}
@ -492,7 +492,7 @@ NS_IMETHODIMP nsMsgXFViewThread::GetFirstUnreadChild(nsIMsgDBHdr **aResult)
PRBool isRead;
nsCOMPtr<nsIMsgDatabase> db;
nsresult rv = m_folders[childIndex]->GetMsgDatabase(nsnull, getter_AddRefs(db));
nsresult rv = m_folders[childIndex]->GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv))
rv = db->IsRead(msgKey, &isRead);
if (NS_SUCCEEDED(rv) && !isRead)

Просмотреть файл

@ -220,7 +220,7 @@ nsresult nsMsgXFVirtualFolderDBView::InsertHdrFromFolder(nsIMsgDBHdr *msgHdr, ns
void nsMsgXFVirtualFolderDBView::UpdateCacheAndViewForFolder(nsIMsgFolder *folder, nsMsgKey *newHits, PRUint32 numNewHits)
{
nsCOMPtr <nsIMsgDatabase> db;
nsresult rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(db));
nsresult rv = folder->GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
nsCString searchUri;
@ -420,7 +420,7 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
nsCOMPtr<nsIMsgDatabase> searchDB;
nsCString searchUri;
m_viewFolder->GetURI(searchUri);
nsresult rv = searchFolder->GetMsgDatabase(nsnull, getter_AddRefs(searchDB));
nsresult rv = searchFolder->GetMsgDatabase(getter_AddRefs(searchDB));
if (NS_SUCCEEDED(rv) && searchDB)
{
if (msgDBService)

Просмотреть файл

@ -158,7 +158,7 @@ var searchListener =
onSearchDone: function(status)
{
print("Finished search hitCount = " + numTotalMessages);
var db = virtualFolder.getMsgDatabase(null);
var db = virtualFolder.msgDatabase;
var dbFolderInfo = db.dBFolderInfo;
dbFolderInfo.numMessages = numTotalMessages;
dbFolderInfo.numUnreadMessages = numUnreadMessages;
@ -206,7 +206,7 @@ function CreateVirtualFolder(newName, parentFolder, searchFolderURIs, searchTerm
{
var newFolder = parentFolder.addSubfolder(newName);
newFolder.setFlag(Ci.nsMsgFolderFlags.Virtual);
var vfdb = newFolder.getMsgDatabase(null);
var vfdb = newFolder.msgDatabase;
var searchTerms = [];
var searchTermString = getSearchTermString(searchTerm);

Просмотреть файл

@ -93,7 +93,7 @@ function deleteMessages(srcFolder, items)
function calculateFolderSize(folder)
{
let msgDB = folder.getMsgDatabase(null);
let msgDB = folder.msgDatabase;
let enumerator = msgDB.EnumerateMessages();
let totalSize = 0;
if (enumerator)
@ -128,7 +128,7 @@ const gTestArray =
// Deleting messages
function testDeleteMessages1() { // delete to trash
// Let's take a moment to re-initialize stuff that got moved
var folder3DB = gLocalFolder3.getMsgDatabase(null);
var folder3DB = gLocalFolder3.msgDatabase;
gMsgHdrs[0].hdr = folder3DB.getMsgHdrForMessageID(gMsgHdrs[0].ID);
// Now delete the message

Просмотреть файл

@ -157,7 +157,8 @@ const gTestArray =
function testMoveMessages2() { copyMessages([gMsgHdrs[2].hdr], true, gLocalInboxFolder, gLocalTrashFolder); },
function testMoveMessages3() {
// This is to test whether the notification is correct for moving from trash
gMsgHdrs[2].hdr = gLocalTrashFolder.getMsgDatabase(null).getMsgHdrForMessageID(gMsgHdrs[2].ID);
gMsgHdrs[2].hdr = gLocalTrashFolder.msgDatabase
.getMsgHdrForMessageID(gMsgHdrs[2].ID);
copyMessages([gMsgHdrs[2].hdr], true, gLocalTrashFolder, gLocalFolder3);
},
@ -171,7 +172,7 @@ const gTestArray =
// Let's take a moment to re-initialize stuff that got moved
gLocalFolder2 = gLocalInboxFolder.getChildNamed("folder2");
gLocalFolder3 = gLocalFolder2.getChildNamed("folder3");
var folder3DB = gLocalFolder3.getMsgDatabase(null);
var folder3DB = gLocalFolder3.msgDatabase;
for (var i = 0; i < gMsgHdrs.length; i++)
gMsgHdrs[i].hdr = folder3DB.getMsgHdrForMessageID(gMsgHdrs[i].ID);
@ -181,7 +182,7 @@ const gTestArray =
// shift delete
function testDeleteMessages2() { deleteMessages(gLocalFolder3, [gMsgHdrs[2].hdr], true, false); },
function testDeleteMessages3() { // normal delete from trash
var trashDB = gLocalTrashFolder.getMsgDatabase(null);
var trashDB = gLocalTrashFolder.msgDatabase;
for (var i = 0; i < gMsgHdrs.length; i++)
gMsgHdrs[i].hdr = trashDB.getMsgHdrForMessageID(gMsgHdrs[i].ID);
deleteMessages(gLocalTrashFolder, [gMsgHdrs[0].hdr], false, false);

Просмотреть файл

@ -881,8 +881,7 @@ nsresult nsMsgDBFolder::CreateFileForDB(const nsACString& userLeafName, nsILocal
}
NS_IMETHODIMP
nsMsgDBFolder::GetMsgDatabase(nsIMsgWindow *aMsgWindow,
nsIMsgDatabase** aMsgDatabase)
nsMsgDBFolder::GetMsgDatabase(nsIMsgDatabase** aMsgDatabase)
{
NS_ENSURE_ARG_POINTER(aMsgDatabase);
GetDatabase();
@ -1884,7 +1883,7 @@ nsMsgDBFolder::SetDBTransferInfo(nsIDBFolderInfo *aTransferInfo)
NS_ENSURE_ARG(aTransferInfo);
nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
nsCOMPtr <nsIMsgDatabase> db;
GetMsgDatabase(nsnull, getter_AddRefs(db));
GetMsgDatabase(getter_AddRefs(db));
if (db)
{
db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
@ -2489,7 +2488,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetParentMsgFolder(nsIMsgFolder **aParentMsgFolder)
}
NS_IMETHODIMP
nsMsgDBFolder::GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result)
nsMsgDBFolder::GetMessages(nsISimpleEnumerator **result)
{
// XXX should this return an empty enumeration?
return NS_ERROR_FAILURE;
@ -4548,7 +4547,7 @@ NS_IMETHODIMP nsMsgDBFolder::EnableNotifications(PRInt32 notificationType, PRBoo
nsCOMPtr <nsIMsgDatabase> database;
if (dbBatching) //only if we do dbBatching we need to get db
GetMsgDatabase(nsnull, getter_AddRefs(database));
GetMsgDatabase(getter_AddRefs(database));
if (enable)
{
@ -4567,7 +4566,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetMessageHeader(nsMsgKey msgKey, nsIMsgDBHdr **aMs
{
NS_ENSURE_ARG_POINTER(aMsgHdr);
nsCOMPtr <nsIMsgDatabase> database;
nsresult rv = GetMsgDatabase(nsnull, getter_AddRefs(database));
nsresult rv = GetMsgDatabase(getter_AddRefs(database));
NS_ENSURE_SUCCESS(rv, rv);
return (database) ? database->GetMsgHdrForKey(msgKey, aMsgHdr) : NS_ERROR_FAILURE;
}

Просмотреть файл

@ -321,7 +321,7 @@ nsMsgTxn::CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, P
NS_ENSURE_ARG(aResult);
nsCOMPtr<nsIMsgDBHdr> message;
nsCOMPtr<nsIMsgDatabase> db;
nsresult rv = aFolder->GetMsgDatabase(nsnull,getter_AddRefs(db));
nsresult rv = aFolder->GetMsgDatabase(getter_AddRefs(db));
if (db)
{
PRBool containsKey;

Просмотреть файл

@ -1813,7 +1813,7 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
msgHdr->GetFolder(getter_AddRefs(folder));
if (folder) {
nsCOMPtr<nsIMsgDatabase> db;
folder->GetMsgDatabase(nsnull, getter_AddRefs(db));
folder->GetMsgDatabase(getter_AddRefs(db));
if (db) {
nsCAutoString reference;
@ -3054,7 +3054,7 @@ NS_IMETHODIMP nsMsgCompose::RememberQueuedDisposition()
if (msgFolder)
{
nsCOMPtr <nsIMsgDatabase> msgDB;
msgFolder->GetMsgDatabase(nsnull, getter_AddRefs(msgDB));
msgFolder->GetMsgDatabase(getter_AddRefs(msgDB));
if (msgDB)
{
msgDB->CreateNewHdr(msgKey, getter_AddRefs(msgHdr));

Просмотреть файл

@ -1164,7 +1164,7 @@ NS_IMETHODIMP nsMsgComposeService::ReplyWithTemplate(nsIMsgDBHdr *aMsgHdr, const
nsCAutoString folderUri(Substring(templateUri, query));
nsresult rv = GetExistingFolder(folderUri, getter_AddRefs(templateFolder));
NS_ENSURE_SUCCESS(rv, rv);
rv = templateFolder->GetMsgDatabase(aMsgWindow, getter_AddRefs(templateDB));
rv = templateFolder->GetMsgDatabase(getter_AddRefs(templateDB));
NS_ENSURE_SUCCESS(rv, rv);
const char *subject = PL_strstr(templateUri, "&subject=");

Просмотреть файл

@ -669,7 +669,7 @@ nsMsgSendLater::SendUnsentMessages(nsIMsgIdentity *aIdentity,
// ### fix me - if we need to reparse the folder, this will be asynchronous
nsCOMPtr<nsISimpleEnumerator> enumerator;
rv = mMessageFolder->GetMessages(m_window, getter_AddRefs(enumerator));
rv = mMessageFolder->GetMessages(getter_AddRefs(enumerator));
NS_ENSURE_SUCCESS(rv, rv);
// copy all the elements in the enumerator into our isupports array....

Просмотреть файл

@ -351,7 +351,7 @@ GlodaFolder.prototype = {
// This is the key action we take; the nsIMsgFolder will continue to
// exist, but we want it to forget about its database so that it can
// be closed and its memory can be reclaimed.
this._xpcomFolder.setMsgDatabase(null);
this._xpcomFolder.msgDatabase = null;
this._xpcomFolder = null;
// since the last retrieval time tracks whether we have marked live or
// not, this needs to be reset to 0 too.

Просмотреть файл

@ -872,7 +872,7 @@ var GlodaIndexer = {
// explicitly inherits from nsIDBChangeAnnouncer, which has the
// AddListener call we want.
if (this._indexingDatabase == null)
this._indexingDatabase = this._indexingFolder.getMsgDatabase(null);
this._indexingDatabase = this._indexingFolder.msgDatabase;
if (aNeedIterator)
this._indexerGetIterator();
this._indexingDatabase.AddListener(this._databaseAnnouncerListener);
@ -905,7 +905,7 @@ var GlodaIndexer = {
*/
_indexerCompletePendingFolderEntry:
function gloda_indexer_indexerCompletePendingFolderEntry() {
this._indexingDatabase = this._indexingFolder.getMsgDatabase(null);
this._indexingDatabase = this._indexingFolder.msgDatabase;
if (this._pendingFolderWantsIterator)
this._indexerGetIterator();
this._indexingDatabase.AddListener(this._databaseAnnouncerListener);
@ -1825,7 +1825,7 @@ var GlodaIndexer = {
}
let glodaIds = [];
let newMessageKeys = [];
for each (let destMsgHdr in fixIterator(aDestFolder.getMessages(null),
for each (let destMsgHdr in fixIterator(aDestFolder.messages,
Ci.nsIMsgDBHdr)) {
let destMsgId = destMsgHdr.messageId;
let matchingSrcHdr = srcMsgIdToHdr[destMsgId];

Просмотреть файл

@ -179,7 +179,7 @@ function GetFolderInfo(aFolder)
{
if (aFolder)
{
var db = aFolder.getMsgDatabase(msgWindow);
var db = aFolder.msgDatabase;
if (db)
return db.dBFolderInfo;
}

Просмотреть файл

@ -383,7 +383,8 @@ var gFeedSubscriptionsWindow = {
var feeds = new Array();
try
{
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder).getMsgDatabase(null);
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder)
.msgDatabase;
var folderInfo = msgdb.dBFolderInfo;
var feedurls = folderInfo.getCharProperty("feedUrl");
var feedUrlArray = feedurls.split("|");
@ -597,7 +598,7 @@ var gFeedSubscriptionsWindow = {
// Cheat and look at the feed url property to see if anyone else is still using the feed...
// you could also accomplish this by looking at some properties in the data source...
// var msgdb = currentFolder.QueryInterface(Components.interfaces.nsIMsgFolder).getMsgDatabase(null);
// var msgdb = currentFolder.QueryInterface(Components.interfaces.nsIMsgFolder).msgDatabase;
// var folderInfo = msgdb.dBFolderInfo;
// var oldFeedUrl = folderInfo.getCharProperty("feedUrl");

Просмотреть файл

@ -133,7 +133,8 @@ var kFeedUrlDelimiter = '|'; // the delimiter used to delimit feed urls in the m
function updateFolderFeedUrl(aFolder, aFeedUrl, aRemoveUrl)
{
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder).getMsgDatabase(null);
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder)
.msgDatabase;
var folderInfo = msgdb.dBFolderInfo;
var oldFeedUrl = folderInfo.getCharProperty("feedUrl");

Просмотреть файл

@ -72,7 +72,7 @@ var nsNewsBlogFeedDownloader =
aUrl = concatenatedUris;
try
{
var msgdb = aFolder.getMsgDatabase(null);
var msgdb = aFolder.msgDatabase;
var folderInfo = msgdb.dBFolderInfo;
folderInfo.setCharProperty("feedUrl", concatenatedUris);
}
@ -199,7 +199,8 @@ var nsNewsBlogFeedDownloader =
loadScripts();
// an rss folder was just renamed...we need to update our feed data source
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder).getMsgDatabase(null);
var msgdb = aFolder.QueryInterface(Components.interfaces.nsIMsgFolder)
.msgDatabase;
var folderInfo = msgdb.dBFolderInfo;
var feedurls = folderInfo.getCharProperty("feedUrl");
var feedUrlArray = feedurls.split("|");
@ -422,7 +423,7 @@ var progressNotifier = {
this.mMsgWindow.windowCommands.selectFolder(feed.folder.URI);
}
else if (feed.folder)
feed.folder.setMsgDatabase(null);
feed.folder.msgDatabase = null;
if (this.mStatusFeedback)
{

Просмотреть файл

@ -138,7 +138,7 @@ nsresult nsAutoSyncState::PlaceIntoDownloadQ(const nsTArray<nsMsgKey> &aMsgKeyLi
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> database;
rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(database));
rv = folder->GetMsgDatabase(getter_AddRefs(database));
if (!database)
return NS_ERROR_FAILURE;
@ -201,7 +201,7 @@ nsresult nsAutoSyncState::SortQueueBasedOnStrategy(nsTArray<nsMsgKey> &aQueue)
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> database;
rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(database));
rv = folder->GetMsgDatabase(getter_AddRefs(database));
if (!database)
return NS_ERROR_FAILURE;
@ -232,7 +232,7 @@ NS_IMETHODIMP nsAutoSyncState::GetNextGroupOfMessages(PRUint32 aSuggestedGroupSi
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> database;
folder->GetMsgDatabase(nsnull, getter_AddRefs(database));
folder->GetMsgDatabase(getter_AddRefs(database));
nsCOMPtr<nsIMutableArray> group = do_CreateInstance(NS_ARRAY_CONTRACTID);
if (database)
@ -341,7 +341,7 @@ NS_IMETHODIMP nsAutoSyncState::ProcessExistingHeaders(PRUint32 aNumOfHdrsToProce
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> database;
rv = folder->GetMsgDatabase(nsnull, getter_AddRefs(database));
rv = folder->GetMsgDatabase(getter_AddRefs(database));
if (!database)
return NS_ERROR_FAILURE;
@ -639,7 +639,7 @@ void nsAutoSyncState::DebugPrintQWithSize(nsTArray<nsMsgKey>& q, PRUint32 toOffs
if (ownerFolder)
{
nsCOMPtr<nsIMsgDatabase> database;
ownerFolder->GetMsgDatabase(nsnull, getter_AddRefs(database));
ownerFolder->GetMsgDatabase(getter_AddRefs(database));
PRUint32 x = q.Length();
while (x > toOffset && database)
@ -661,7 +661,7 @@ void nsAutoSyncState::DebugPrintQWithSize(nsIMutableArray *q, PRUint32 toOffset)
if (ownerFolder)
{
nsCOMPtr<nsIMsgDatabase> database;
ownerFolder->GetMsgDatabase(nsnull, getter_AddRefs(database));
ownerFolder->GetMsgDatabase(getter_AddRefs(database));
PRUint32 x;
q->GetLength(&x);

Просмотреть файл

@ -818,7 +818,7 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFolder(nsIMsgWindow *msgWindow, nsIUrlList
return rv;
}
NS_IMETHODIMP nsImapMailFolder::GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result)
NS_IMETHODIMP nsImapMailFolder::GetMessages(nsISimpleEnumerator* *result)
{
NS_ENSURE_ARG_POINTER(result);
if (!mDatabase)
@ -1298,7 +1298,7 @@ NS_IMETHODIMP nsImapMailFolder::EmptyTrash(nsIMsgWindow *aMsgWindow, nsIUrlListe
if (WeAreOffline())
{
nsCOMPtr <nsIMsgDatabase> trashDB;
rv = trashFolder->GetMsgDatabase(nsnull, getter_AddRefs(trashDB));
rv = trashFolder->GetMsgDatabase(getter_AddRefs(trashDB));
if (trashDB)
{
nsMsgKey fakeKey;
@ -4581,7 +4581,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
{
nsCOMPtr<nsIMsgDatabase> srcDB;
if (srcFolder)
rv = srcFolder->GetMsgDatabase(msgWindow, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if (NS_SUCCEEDED(rv) && srcDB)
{
nsRefPtr<nsImapMoveCopyMsgTxn> msgTxn;
@ -4659,7 +4659,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
if (flags & kImapMsgDeletedFlag && ShowDeletedMessages())
{
nsCOMPtr<nsIMsgDatabase> db;
rv = GetMsgDatabase(nsnull, getter_AddRefs(db));
rv = GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
nsTArray<nsMsgKey> keyArray;
@ -4686,7 +4686,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
if (!ShowDeletedMessages())
{
nsCOMPtr<nsIMsgDatabase> db;
rv = GetMsgDatabase(nsnull, getter_AddRefs(db));
rv = GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
nsTArray<nsMsgKey> keyArray;
@ -6870,7 +6870,7 @@ nsImapFolderCopyState::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
}
nsCOMPtr<nsISimpleEnumerator> messages;
rv = m_srcFolder->GetMessages(m_msgWindow, getter_AddRefs(messages));
rv = m_srcFolder->GetMessages(getter_AddRefs(messages));
nsCOMPtr<nsIMutableArray> msgArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
NS_ENSURE_TRUE(msgArray, rv);
PRBool hasMoreElements;

Просмотреть файл

@ -234,7 +234,7 @@ public:
// nsIMsgFolder methods:
NS_IMETHOD GetSubFolders(nsISimpleEnumerator **aResult);
NS_IMETHOD GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result);
NS_IMETHOD GetMessages(nsISimpleEnumerator* *result);
NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow);
NS_IMETHOD CreateSubfolder(const nsAString& folderName,nsIMsgWindow *msgWindow );

Просмотреть файл

@ -1998,7 +1998,7 @@ nsresult nsImapService::OfflineAppendFromFile(nsIFile *aFile,
nsISupports *aCopyState)
{
nsCOMPtr<nsIMsgDatabase> destDB;
nsresult rv = aDstFolder->GetMsgDatabase(nsnull, getter_AddRefs(destDB));
nsresult rv = aDstFolder->GetMsgDatabase(getter_AddRefs(destDB));
// ### might need to send some notifications instead of just returning
if (NS_SUCCEEDED(rv) && destDB)

Просмотреть файл

@ -79,7 +79,7 @@ nsImapMoveCopyMsgTxn::Init(nsIMsgFolder* srcFolder, nsTArray<nsMsgKey>* srcKeyAr
m_srcIsPop3 = PR_TRUE;
PRUint32 i, count = m_srcKeyArray.Length();
nsCOMPtr<nsIMsgDatabase> srcDB;
rv = srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgDBHdr> srcHdr;
nsCOMPtr<nsIMsgDBHdr> copySrcHdr;
@ -366,9 +366,9 @@ nsImapMoveCopyMsgTxn::UndoMailboxDelete()
nsCOMPtr<nsIMsgDatabase> srcDB;
nsCOMPtr<nsIMsgDatabase> dstDB;
rv = srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if (NS_FAILED(rv)) return rv;
rv = dstFolder->GetMsgDatabase(nsnull, getter_AddRefs(dstDB));
rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
if (NS_FAILED(rv)) return rv;
PRUint32 count = m_srcKeyArray.Length();
@ -411,7 +411,7 @@ nsImapMoveCopyMsgTxn::RedoMailboxDelete()
nsCOMPtr<nsIMsgDatabase> srcDB;
nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryReferent(m_srcFolder, &rv);
if (NS_FAILED(rv) || !srcFolder) return rv;
rv = srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if (NS_SUCCEEDED(rv))
{
srcDB->DeleteMessages(&m_srcKeyArray, nsnull);

Просмотреть файл

@ -355,8 +355,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::ParseFolder(nsIMsgWindow *aMsgWindow, nsIUrl
// this won't force a reparse of the folder if the db is invalid.
NS_IMETHODIMP
nsMsgLocalMailFolder::GetMsgDatabase(nsIMsgWindow *aMsgWindow,
nsIMsgDatabase** aMsgDatabase)
nsMsgLocalMailFolder::GetMsgDatabase(nsIMsgDatabase** aMsgDatabase)
{
return GetDatabaseWOReparse(aMsgDatabase);
}
@ -639,7 +638,7 @@ nsMsgLocalMailFolder::UpdateFolder(nsIMsgWindow *aWindow)
}
NS_IMETHODIMP
nsMsgLocalMailFolder::GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result)
nsMsgLocalMailFolder::GetMessages(nsISimpleEnumerator **result)
{
nsCOMPtr <nsIMsgDatabase> msgDB;
nsresult rv = GetDatabaseWOReparse(getter_AddRefs(msgDB));
@ -1804,7 +1803,7 @@ nsMsgLocalMailFolder::CopyFolderAcrossServer(nsIMsgFolder* srcFolder, nsIMsgWind
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISimpleEnumerator> messages;
rv = srcFolder->GetMessages(msgWindow, getter_AddRefs(messages));
rv = srcFolder->GetMessages(getter_AddRefs(messages));
nsCOMPtr<nsIMutableArray> msgArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
@ -2544,7 +2543,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded)
== (nsMsgFolderFlags::Inbox|nsMsgFolderFlags::ImapBox))
{
nsCOMPtr <nsIMsgDatabase> db;
srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(db));
srcFolder->GetMsgDatabase(getter_AddRefs(db));
if (db)
{
nsMsgKey srcKey;
@ -2772,7 +2771,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndMessage(nsMsgKey key)
nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryInterface(mCopyState->m_srcSupport, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIMsgDatabase> srcDB;
srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if (srcDB)
{
nsCOMPtr <nsIMsgDBHdr> srcMsgHdr;

Просмотреть файл

@ -136,11 +136,10 @@ public:
// nsIMsgFolder methods:
NS_IMETHOD GetSubFolders(nsISimpleEnumerator* *aResult);
NS_IMETHOD GetMsgDatabase(nsIMsgWindow *aMsgWindow,
nsIMsgDatabase** aMsgDatabase);
NS_IMETHOD GetMsgDatabase(nsIMsgDatabase **aMsgDatabase);
NS_IMETHOD OnAnnouncerGoingAway(nsIDBChangeAnnouncer *instigator);
NS_IMETHOD GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result);
NS_IMETHOD GetMessages(nsISimpleEnumerator **result);
NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow);
NS_IMETHOD CreateSubfolder(const nsAString& folderName ,nsIMsgWindow *msgWindow);

Просмотреть файл

@ -205,7 +205,7 @@ nsLocalMoveCopyMsgTxn::UndoTransaction()
rv = mailSession->AddFolderListener(mUndoFolderListener, nsIFolderListener::event);
NS_ENSURE_SUCCESS(rv,rv);
rv = dstFolder->GetMsgDatabase(nsnull, getter_AddRefs(dstDB));
rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
NS_ENSURE_SUCCESS(rv,rv);
}
else
@ -239,10 +239,10 @@ nsLocalMoveCopyMsgTxn::UndoTransactionInternal()
nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
rv = srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if(NS_FAILED(rv)) return rv;
rv = dstFolder->GetMsgDatabase(nsnull, getter_AddRefs(dstDB));
rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
if (NS_FAILED(rv)) return rv;
PRUint32 count = m_srcKeyArray.Length();
@ -313,9 +313,9 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
rv = srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(srcDB));
rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
if(NS_FAILED(rv)) return rv;
rv = dstFolder->GetMsgDatabase(nsnull, getter_AddRefs(dstDB));
rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
if (NS_FAILED(rv)) return rv;
PRUint32 count = m_srcKeyArray.Length();

Просмотреть файл

@ -145,7 +145,7 @@ nsresult nsMailboxService::CopyMessages(nsTArray<nsMsgKey> &msgKeys,
nsCOMPtr <nsIMsgDBHdr> msgHdr;
nsCOMPtr <nsIMsgDatabase> db;
srcFolder->GetMsgDatabase(aMsgWindow, getter_AddRefs(db));
srcFolder->GetMsgDatabase(getter_AddRefs(db));
if (db)
{
db->GetMsgHdrForKey(msgKeys[0], getter_AddRefs(msgHdr));

Просмотреть файл

@ -103,7 +103,7 @@ nsMovemailIncomingServer::PerformBiff(nsIMsgWindow *aMsgWindow)
{
PRBool valid = PR_FALSE;
nsCOMPtr <nsIMsgDatabase> db;
rv = inbox->GetMsgDatabase(aMsgWindow, getter_AddRefs(db));
rv = inbox->GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
rv = db->GetSummaryValid(&valid);

Просмотреть файл

@ -285,7 +285,7 @@ nsresult nsPop3IncomingServer::GetInbox(nsIMsgWindow *msgWindow, nsIMsgFolder **
if (NS_SUCCEEDED(rv) && localInbox)
{
nsCOMPtr <nsIMsgDatabase> db;
rv = (*inbox)->GetMsgDatabase(msgWindow, getter_AddRefs(db));
rv = (*inbox)->GetMsgDatabase(getter_AddRefs(db));
if (NS_FAILED(rv))
{
(*inbox)->SetMsgDatabase(nsnull);
@ -331,7 +331,7 @@ NS_IMETHODIMP nsPop3IncomingServer::PerformBiff(nsIMsgWindow *aMsgWindow)
{
PRBool valid = PR_FALSE;
nsCOMPtr <nsIMsgDatabase> db;
rv = inbox->GetMsgDatabase(aMsgWindow, getter_AddRefs(db));
rv = inbox->GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
rv = db->GetSummaryValid(&valid);
if (NS_SUCCEEDED(rv) && valid)
@ -609,7 +609,7 @@ nsresult nsPop3GetMailChainer::GetNewMailForServers(nsISupportsArray *servers, n
m_listener = listener;
nsCOMPtr <nsIMsgDatabase> destFolderDB;
nsresult rv = folderToDownloadTo->GetMsgDatabase(msgWindow, getter_AddRefs(destFolderDB));
nsresult rv = folderToDownloadTo->GetMsgDatabase(getter_AddRefs(destFolderDB));
if (NS_FAILED(rv) || !destFolderDB)
{
nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(folderToDownloadTo);

Просмотреть файл

@ -190,7 +190,7 @@ NS_IMETHODIMP nsRssIncomingServer::GetNewMail(nsIMsgWindow *aMsgWindow, nsIUrlLi
nsresult rv;
nsCOMPtr <nsINewsBlogFeedDownloader> rssDownloader = do_GetService("@mozilla.org/newsblog-feed-downloader;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = aFolder->GetMsgDatabase(aMsgWindow, getter_AddRefs(db));
rv = aFolder->GetMsgDatabase(getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
rv = db->GetSummaryValid(&valid);

Просмотреть файл

@ -531,7 +531,7 @@ nsresult MsgMapiListContext::OpenDatabase (nsIMsgFolder *folder)
if (folder)
{
m_folder = folder;
dbErr = folder->GetMsgDatabase(nsnull, getter_AddRefs(m_db));
dbErr = folder->GetMsgDatabase(getter_AddRefs(m_db));
if (m_db)
dbErr = m_db->EnumerateMessages(getter_AddRefs(m_msgEnumerator));
}

Просмотреть файл

@ -71,7 +71,7 @@ nsNNTPArticleList::Initialize(nsIMsgNewsFolder *newsFolder)
nsCOMPtr <nsIMsgFolder> folder = do_QueryInterface(m_newsFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
rv = folder->GetMsgDatabase(nsnull /* msgWindow */, getter_AddRefs(m_newsDB));
rv = folder->GetMsgDatabase(getter_AddRefs(m_newsDB));
NS_ENSURE_SUCCESS(rv,rv);
if (!m_newsDB) return NS_ERROR_UNEXPECTED;

Просмотреть файл

@ -296,7 +296,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(nsIMsgWindow *aMsgWindow,
m_msgWindow = aMsgWindow;
if (!m_newsDB)
rv = folder->GetMsgDatabase(nsnull /* use m_msgWindow? */, getter_AddRefs(m_newsDB));
rv = folder->GetMsgDatabase(getter_AddRefs(m_newsDB));
nsCOMPtr<nsINewsDatabase> db(do_QueryInterface(m_newsDB, &rv));
NS_ENSURE_SUCCESS(rv,rv);

Просмотреть файл

@ -560,7 +560,7 @@ nsresult nsMsgDownloadAllNewsgroups::DownloadMsgsForCurrentGroup()
NS_ENSURE_TRUE(m_downloaderForGroup, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr <nsIMsgDatabase> db;
nsCOMPtr <nsIMsgDownloadSettings> downloadSettings;
m_currentFolder->GetMsgDatabase(m_window, getter_AddRefs(db));
m_currentFolder->GetMsgDatabase(getter_AddRefs(db));
nsresult rv = m_currentFolder->GetDownloadSettings(getter_AddRefs(downloadSettings));
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -419,7 +419,7 @@ nsMsgNewsFolder::GetCanCompact(PRBool *aResult)
}
NS_IMETHODIMP
nsMsgNewsFolder::GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result)
nsMsgNewsFolder::GetMessages(nsISimpleEnumerator **result)
{
nsresult rv = GetDatabase();
*result = nsnull;

Просмотреть файл

@ -67,7 +67,7 @@ public:
// nsIMsgFolder methods:
NS_IMETHOD GetSubFolders(nsISimpleEnumerator **aResult);
NS_IMETHOD GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator* *result);
NS_IMETHOD GetMessages(nsISimpleEnumerator **result);
NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow);
NS_IMETHOD CreateSubfolder(const nsAString& folderName,nsIMsgWindow *msgWindow);

Просмотреть файл

@ -159,12 +159,12 @@ function create_post(baseURL, file) {
}
function resetFolder(folder) {
var headerEnum = folder.getMessages(null);
var headerEnum = folder.messages;
var headers = [];
while (headerEnum.hasMoreElements())
headers.push(headerEnum.getNext().QueryInterface(Ci.nsIMsgDBHdr));
var db = folder.getMsgDatabase(null);
var db = folder.msgDatabase;
db.dBFolderInfo.knownArtsSet = "";
for each (var header in headers) {
db.DeleteHeader(header, null, true, false);

Просмотреть файл

@ -103,7 +103,7 @@ function testAttrib(handler, localserver) {
OnStopRunningUrl: function () { localserver.closeCachedConnections() }});
server.performTest();
var headerEnum = folder.getMessages(null);
var headerEnum = folder.messages;
var headers = [];
while (headerEnum.hasMoreElements())
headers.push(headerEnum.getNext().QueryInterface(Ci.nsIMsgDBHdr));
@ -131,14 +131,12 @@ var actionResults = {
"1@regular.invalid" : ["priority", 6],
// "2@regular.invalid" should not be in database
"3@regular.invalid" : function (header, folder) {
var db = folder.getMsgDatabase(null);
var flags = db.GetThreadContainingMsgHdr(header).flags;
var flags = folder.msgDatabase.GetThreadContainingMsgHdr(header).flags;
// This is checking the thread's kill flag
return (flags & 0x40000) == 0x40000;
},
"4@regular.invalid" : function (header, folder) {
var db = folder.getMsgDatabase(null);
var flags = db.GetThreadContainingMsgHdr(header).flags;
var flags = folder.msgDatabase.GetThreadContainingMsgHdr(header).flags;
// This is checking the thread's watch flag
return (flags & 0x100) == 0x100;
},
@ -158,7 +156,7 @@ function testAction(handler, localserver) {
OnStopRunningUrl: function () { localserver.closeCachedConnections() }});
server.performTest();
var headerEnum = folder.getMessages(null);
var headerEnum = folder.messages;
var headers = [];
while (headerEnum.hasMoreElements())
headers.push(headerEnum.getNext().QueryInterface(Ci.nsIMsgDBHdr));

Просмотреть файл

@ -1883,8 +1883,7 @@
var folderArray = new Array;
if (aFolder.flags & Components.interfaces.nsMsgFolderFlags.Virtual)
{
var msgDatabase = aFolder.getMsgDatabase(null);
var dbFolderInfo = msgDatabase.dBFolderInfo;
var dbFolderInfo = aFolder.msgDatabase.dBFolderInfo;
var srchFolderUri = dbFolderInfo.getCharProperty("searchFolderUri");
var srchFolderUriArray = srchFolderUri.split('|');
var foldersAdded = 0;
@ -1903,8 +1902,8 @@
{
aFolder = folderArray[folderIndex];
// now get the database
var msgDatabase = aFolder.getMsgDatabase(null);
aFolder.setMsgDatabase(null);
var msgDatabase = aFolder.msgDatabase;
aFolder.msgDatabase = null;
var msgKeys = {};
var numMsgKeys = {};
msgDatabase.getNewList(numMsgKeys, msgKeys);
@ -1918,13 +1917,13 @@
// for each of the message keys.
try {
aOutAsync.value = aFolder.fetchMsgPreviewText(msgKeys.value, numMsgKeys.value, false, aUrlListener);
aFolder.setMsgDatabase(null);
aFolder.msgDatabase = null;
}
catch (ex)
{
// fetchMsgPreviewText throws an error when we call it on a news folder, we should just not show
// the tooltip if this method returns an error.
aFolder.setMsgDatabase(null);
aFolder.msgDatabase = null;
continue;
}
}