зеркало из https://github.com/mozilla/pjs.git
Backing out Bug 413590 due to regressions.
This commit is contained in:
Родитель
f9b696c70d
Коммит
96be78740e
|
@ -947,8 +947,6 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
|
|||
PRBool *pResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(pResult);
|
||||
NS_ENSURE_ARG_POINTER(charset);
|
||||
|
||||
PRBool result = PR_FALSE;
|
||||
|
||||
nsresult err = NS_OK;
|
||||
|
|
|
@ -154,7 +154,6 @@ NS_IMETHODIMP nsMsgBiffManager::Shutdown()
|
|||
|
||||
NS_IMETHODIMP nsMsgBiffManager::AddServerBiff(nsIMsgIncomingServer *server)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(server);
|
||||
nsresult rv;
|
||||
PRInt32 biffMinutes;
|
||||
|
||||
|
@ -212,7 +211,6 @@ NS_IMETHODIMP nsMsgBiffManager::ForceBiffAll()
|
|||
|
||||
NS_IMETHODIMP nsMsgBiffManager::OnServerLoaded(nsIMsgIncomingServer *server)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(server);
|
||||
nsresult rv;
|
||||
PRBool doBiff = PR_FALSE;
|
||||
|
||||
|
|
|
@ -628,8 +628,6 @@ NS_IMETHODIMP nsMsgGroupView::GetCellProperties(PRInt32 aRow, nsITreeColumn *aCo
|
|||
|
||||
NS_IMETHODIMP nsMsgGroupView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCol);
|
||||
|
||||
if (!IsValidIndex(aRow))
|
||||
return NS_MSG_INVALID_DBVIEW_INDEX;
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ NS_IMETHODIMP nsMsgSearchDBView::Close()
|
|||
|
||||
NS_IMETHODIMP nsMsgSearchDBView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCol);
|
||||
const PRUnichar* colID;
|
||||
aCol->GetIdConst(&colID);
|
||||
if (colID[0] == 'l' && colID[1] == 'o') // location, need to check for "lo" not just "l" to avoid "label" column
|
||||
|
@ -168,9 +167,6 @@ nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDB
|
|||
|
||||
NS_IMETHODIMP nsMsgSearchDBView::GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **aFolder)
|
||||
{
|
||||
if (!m_folders)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return m_folders->QueryElementAt(index, NS_GET_IID(nsIMsgFolder), (void **) aFolder);
|
||||
}
|
||||
|
||||
|
@ -253,8 +249,7 @@ nsMsgSearchDBView::OnNewSearch()
|
|||
|
||||
m_dbToUseList.Clear();
|
||||
|
||||
if (m_folders)
|
||||
m_folders->Clear();
|
||||
m_folders->Clear();
|
||||
m_keys.RemoveAll();
|
||||
m_levels.Clear();
|
||||
m_flags.Clear();
|
||||
|
@ -529,9 +524,8 @@ nsMsgSearchDBView::OnStopCopy(nsresult aStatus)
|
|||
if (NS_SUCCEEDED(aStatus))
|
||||
{
|
||||
mCurIndex++;
|
||||
PRUint32 numFolders = 0;
|
||||
if (m_uniqueFoldersSelected)
|
||||
rv = m_uniqueFoldersSelected->Count(&numFolders);
|
||||
PRUint32 numFolders =0;
|
||||
rv = m_uniqueFoldersSelected->Count(&numFolders);
|
||||
if ( mCurIndex < (PRUint32) numFolders)
|
||||
{
|
||||
nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
|
||||
|
|
|
@ -273,8 +273,6 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(nsIMsgDBHdr* aMsgHdr, nsIMsgFolder *fold
|
|||
NS_IMETHODIMP
|
||||
nsMsgXFVirtualFolderDBView::OnSearchDone(nsresult status)
|
||||
{
|
||||
if (!m_viewFolder)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
// handle any non verified hits we haven't handled yet.
|
||||
UpdateCacheAndViewForPrevSearchedFolders(nsnull);
|
||||
|
||||
|
@ -322,8 +320,7 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
|
|||
|
||||
m_doingSearch = PR_TRUE;
|
||||
|
||||
if (m_folders)
|
||||
m_folders->Clear();
|
||||
m_folders->Clear();
|
||||
m_keys.RemoveAll();
|
||||
m_levels.Clear();
|
||||
m_flags.Clear();
|
||||
|
@ -337,11 +334,10 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
|
|||
// and for each folder, then open the db and pull out the cached hits, add them to the view.
|
||||
// For each hit in a new folder, we'll then clean up the stale hits from the previous folder(s).
|
||||
|
||||
PRInt32 scopeCount = 0;
|
||||
PRInt32 scopeCount;
|
||||
nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
|
||||
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID);
|
||||
if (searchSession)
|
||||
searchSession->CountSearchScopes(&scopeCount);
|
||||
searchSession->CountSearchScopes(&scopeCount);
|
||||
for (PRInt32 i = 0; i < scopeCount; i++)
|
||||
{
|
||||
nsMsgSearchScopeValue scopeId;
|
||||
|
|
|
@ -1054,7 +1054,7 @@ private:
|
|||
|
||||
nsresult nsBayesianFilter::tokenizeMessage(const char* aMessageURI, nsIMsgWindow *aMsgWindow, TokenAnalyzer* aAnalyzer)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aMessageURI);
|
||||
|
||||
nsCOMPtr <nsIMsgMessageService> msgService;
|
||||
nsresult rv = GetMessageServiceFromURI(nsDependentCString(aMessageURI), getter_AddRefs(msgService));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -1247,7 +1247,6 @@ NS_IMETHODIMP nsBayesianFilter::ClassifyMessage(const char *aMessageURL, nsIMsgW
|
|||
/* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURLs, in nsIJunkMailClassificationListener aListener); */
|
||||
NS_IMETHODIMP nsBayesianFilter::ClassifyMessages(PRUint32 aCount, const char **aMsgURLs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aMsgURLs);
|
||||
TokenAnalyzer* analyzer = new MessageClassifier(this, aListener, aMsgWindow, aCount, aMsgURLs);
|
||||
if (!analyzer) return NS_ERROR_OUT_OF_MEMORY;
|
||||
TokenStreamListener *tokenListener = new TokenStreamListener(analyzer);
|
||||
|
|
|
@ -189,8 +189,7 @@ NS_IMETHODIMP nsMsgMailViewList::AddMailView(nsIMsgMailView * aMailView)
|
|||
|
||||
NS_IMETHODIMP nsMsgMailViewList::RemoveMailView(nsIMsgMailView * aMailView)
|
||||
{
|
||||
if (m_mailViews)
|
||||
m_mailViews->RemoveElement(static_cast<nsISupports*>(aMailView));
|
||||
m_mailViews->RemoveElement(static_cast<nsISupports*>(aMailView));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -210,9 +209,8 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
|
|||
// brute force...remove all the old filters in our filter list, then we'll re-add our current
|
||||
// list
|
||||
nsCOMPtr<nsIMsgFilter> msgFilter;
|
||||
PRUint32 numFilters = 0;
|
||||
if (mFilterList)
|
||||
mFilterList->GetFilterCount(&numFilters);
|
||||
PRUint32 numFilters;
|
||||
mFilterList->GetFilterCount(&numFilters);
|
||||
while (numFilters)
|
||||
{
|
||||
mFilterList->RemoveFilterAt(numFilters - 1);
|
||||
|
@ -223,14 +221,13 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
|
|||
ConvertMailViewListToFilterList();
|
||||
|
||||
// now save the filters to our file
|
||||
return mFilterList ? mFilterList->SaveToDefaultFile() : NS_ERROR_FAILURE;
|
||||
return mFilterList->SaveToDefaultFile();
|
||||
}
|
||||
|
||||
nsresult nsMsgMailViewList::ConvertMailViewListToFilterList()
|
||||
{
|
||||
PRUint32 mailViewCount = 0;
|
||||
if (m_mailViews)
|
||||
m_mailViews->Count(&mailViewCount);
|
||||
m_mailViews->Count(&mailViewCount);
|
||||
nsCOMPtr<nsIMsgMailView> mailView;
|
||||
nsCOMPtr<nsIMsgFilter> newMailFilter;
|
||||
nsString mailViewName;
|
||||
|
|
|
@ -826,13 +826,11 @@ NS_IMETHODIMP nsImapService::Search(nsIMsgSearchSession *aSearchSession,
|
|||
nsIMsgFolder *aMsgFolder,
|
||||
const char *aSearchUri)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aMsgFolder);
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
nsCAutoString folderURI;
|
||||
|
||||
nsCOMPtr<nsIImapUrl> imapUrl;
|
||||
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession);
|
||||
|
||||
nsCAutoString urlSpec;
|
||||
PRUnichar hierarchySeparator = GetHierarchyDelimiter(aMsgFolder);
|
||||
|
@ -1124,7 +1122,6 @@ NS_IMETHODIMP nsImapService::StreamMessage(const char *aMessageURI,
|
|||
const char *aAdditionalHeader,
|
||||
nsIURI **aURL)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aMessageURI);
|
||||
nsCOMPtr<nsIMsgFolder> folder;
|
||||
nsCAutoString msgKey;
|
||||
nsCAutoString mimePart;
|
||||
|
@ -1466,7 +1463,6 @@ NS_IMETHODIMP nsImapService::DeleteFolder(nsIEventTarget *aClientEventTarget,
|
|||
nsIMsgWindow *aMsgWindow,
|
||||
nsIURI **aURL)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aImapMailFolder);
|
||||
// If it's an aol server then use 'deletefolder' url to
|
||||
// remove all msgs first and then remove the folder itself.
|
||||
PRBool removeFolderAndMsgs = PR_FALSE;
|
||||
|
@ -2699,9 +2695,7 @@ NS_IMETHODIMP nsImapService::GetDefaultLocalPath(nsILocalFile **aResult)
|
|||
NS_APP_IMAP_MAIL_50_DIR,
|
||||
havePref,
|
||||
getter_AddRefs(localFile));
|
||||
|
||||
if (!localFile)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRBool exists;
|
||||
rv = localFile->Exists(&exists);
|
||||
if (NS_SUCCEEDED(rv) && !exists)
|
||||
|
|
Загрузка…
Ссылка в новой задаче