Bug 789827 - Fix nullptr abuse in comm-central. r=Standard8. Bustage fix for CLOSED TREE
This commit is contained in:
Родитель
6c2cb157b4
Коммит
859d8a7d13
|
@ -240,7 +240,7 @@ void nsMsgXFVirtualFolderDBView::UpdateCacheAndViewForPrevSearchedFolders(nsIMsg
|
|||
{
|
||||
// this must be a folder that had no hits with the current search.
|
||||
// So all cached hits, if any, need to be removed.
|
||||
UpdateCacheAndViewForFolder(m_foldersSearchingOver[0], 0, nullptr);
|
||||
UpdateCacheAndViewForFolder(m_foldersSearchingOver[0], nullptr, 0);
|
||||
m_foldersSearchingOver.RemoveObjectAt(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2754,7 +2754,7 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgWindow *aMsgWindow, bool *aFiltersRun)
|
|||
// post analysis filters will run consistently on a folder, even if
|
||||
// disabled junk processing, which could be dynamic through whitelisting,
|
||||
// makes the bayes analysis unnecessary.
|
||||
OnMessageClassified(nullptr, nullptr, nullptr);
|
||||
OnMessageClassified(nullptr, nsIJunkMailPlugin::UNCLASSIFIED, 0);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -1241,25 +1241,25 @@ RFC2231ParmFolding(const char *parmName, const nsCString& charset,
|
|||
// check to see if we are in the middle of escaped char
|
||||
if (*end == '%')
|
||||
{
|
||||
tmp = '%'; *end = nullptr;
|
||||
tmp = '%'; *end = 0;
|
||||
}
|
||||
else if (end-1 > start && *(end-1) == '%')
|
||||
{
|
||||
end -= 1; tmp = '%'; *end = nullptr;
|
||||
end -= 1; tmp = '%'; *end = 0;
|
||||
}
|
||||
else if (end-2 > start && *(end-2) == '%')
|
||||
{
|
||||
end -= 2; tmp = '%'; *end = nullptr;
|
||||
end -= 2; tmp = '%'; *end = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = *end; *end = nullptr;
|
||||
tmp = *end; *end = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// XXX should check if we are in the middle of escaped char (RFC 822)
|
||||
tmp = *end; *end = nullptr;
|
||||
tmp = *end; *end = 0;
|
||||
}
|
||||
NS_MsgSACat(&foldedParm, start);
|
||||
if (!needEscape)
|
||||
|
|
|
@ -223,7 +223,7 @@ MsgDeliveryListener::~MsgDeliveryListener()
|
|||
NS_IMETHODIMP MsgDeliveryListener::OnStartRunningUrl(nsIURI *url)
|
||||
{
|
||||
if (mMsgSend)
|
||||
mMsgSend->NotifyListenerOnStartSending(nullptr, nullptr);
|
||||
mMsgSend->NotifyListenerOnStartSending(nullptr, 0);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -4260,7 +4260,7 @@ nsMsgComposeAndSend::CreateRFC822Message(
|
|||
aMsgType, aMsgBody,
|
||||
aMsgBodyLength,
|
||||
nullptr, aAttachments,
|
||||
nullptr, EmptyCString(), nullptr);
|
||||
nullptr, EmptyCString(), nsIMsgCompType::New);
|
||||
|
||||
if (NS_FAILED(rv) && mSendReport)
|
||||
mSendReport->SetError(nsIMsgSendReport::process_Current, rv, false);
|
||||
|
@ -4312,9 +4312,9 @@ nsMsgComposeAndSend::SendMessageFile(
|
|||
|
||||
rv = Init(aUserIndentity, aAccountKey, (nsMsgCompFields *)fields, sendIFile,
|
||||
digest_p, false, mode, msgToReplace,
|
||||
nullptr, nullptr, nullptr,
|
||||
nullptr, nullptr, 0,
|
||||
nullptr, nullptr,
|
||||
password, EmptyCString(), nullptr);
|
||||
password, EmptyCString(), nsIMsgCompType::New);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = DeliverMessage();
|
||||
|
|
|
@ -1346,9 +1346,9 @@ public:
|
|||
{
|
||||
// call all listeners with null parameters to signify end of batch
|
||||
if (mJunkListener)
|
||||
mJunkListener->OnMessageClassified(nullptr, nullptr, nullptr);
|
||||
mJunkListener->OnMessageClassified(nullptr, nsIJunkMailPlugin::UNCLASSIFIED, 0);
|
||||
if (mTraitListener)
|
||||
mTraitListener->OnMessageTraitsClassified(nullptr, nullptr, nullptr, nullptr);
|
||||
mTraitListener->OnMessageTraitsClassified(nullptr, 0, nullptr, nullptr);
|
||||
mTokenListener = nullptr; // this breaks the circular ref that keeps this object alive
|
||||
// so we will be destroyed as a result.
|
||||
}
|
||||
|
|
|
@ -4646,7 +4646,7 @@ nsImapMailFolder::NormalEndMsgWriteStream(nsMsgKey uidOfMessage,
|
|||
msgUrl->GetMsgWindow(getter_AddRefs(msgWindow));
|
||||
}
|
||||
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr,
|
||||
this, mDatabase, nullptr, nullptr, this,
|
||||
this, mDatabase, nullptr, 0, this,
|
||||
msgWindow);
|
||||
NotifyFolderEvent(mFiltersAppliedAtom);
|
||||
}
|
||||
|
@ -9080,7 +9080,7 @@ nsImapMailFolder::OnMessageClassified(const char * aMsgURI,
|
|||
else // end of batch
|
||||
{
|
||||
// Parent will apply post bayes filters.
|
||||
nsMsgDBFolder::OnMessageClassified(nullptr, nullptr, nullptr);
|
||||
nsMsgDBFolder::OnMessageClassified(nullptr, nsIJunkMailPlugin::UNCLASSIFIED, 0);
|
||||
|
||||
if (m_junkMessagesToMarkAsRead)
|
||||
{
|
||||
|
|
|
@ -527,7 +527,7 @@ nsresult nsEudoraCompose::GetLocalAttachments(nsIArray **aArray)
|
|||
|
||||
nsCOMPtr <nsIURI> uri;
|
||||
nsresult rv = NS_NewFileURI(getter_AddRefs(uri), pAttach->pAttachment);
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
uri->GetSpec(urlStr);
|
||||
if (urlStr.IsEmpty())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -3380,7 +3380,7 @@ nsMsgLocalMailFolder::OnMessageClassified(const char *aMsgURI,
|
|||
else // end of batch
|
||||
{
|
||||
// Parent will apply post bayes filters.
|
||||
nsMsgDBFolder::OnMessageClassified(nullptr, nullptr, nullptr);
|
||||
nsMsgDBFolder::OnMessageClassified(nullptr, nsIJunkMailPlugin::UNCLASSIFIED, 0);
|
||||
nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID));
|
||||
if (!mSpamKeysToMove.IsEmpty())
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче