зеркало из https://github.com/mozilla/gecko-dev.git
fix crash cancelling msg copy operation, r=neil.parkwaycc.co.uk, sr=sspitzer
This commit is contained in:
Родитель
5beee5f70d
Коммит
5f2958c236
|
@ -287,11 +287,17 @@ nsMsgCopyService::DoNextCopy()
|
|||
}
|
||||
else if (copyRequest->m_requestType == nsCopyFoldersType )
|
||||
{
|
||||
copySource->m_processed = PR_TRUE;
|
||||
copySource->m_processed = PR_TRUE;
|
||||
rv = copyRequest->m_dstFolder->CopyFolder
|
||||
(copySource->m_msgFolder,
|
||||
copyRequest->m_isMoveOrDraftOrTemplate,
|
||||
copyRequest->m_msgWindow, copyRequest->m_listener);
|
||||
// If it's a copy folder operation and the destination
|
||||
// folder already exists, CopyFolder() returns an error w/o sending
|
||||
// a completion notification, so clear it here.
|
||||
if (NS_FAILED(rv))
|
||||
ClearRequest(copyRequest, rv);
|
||||
|
||||
}
|
||||
else if (copyRequest->m_requestType == nsCopyFileMessageType)
|
||||
{
|
||||
|
@ -318,14 +324,6 @@ nsMsgCopyService::DoNextCopy()
|
|||
}
|
||||
}
|
||||
}
|
||||
// Don't clear copy request in failure case - notify completion should do that.
|
||||
// Hmm, this is not true in case it's a copy folder opeation and the destination
|
||||
// folder already exists. In this case CopyFolder() returns an error and there
|
||||
// won't be completion notification at all and the request will stay in the
|
||||
// queue forever.
|
||||
if (NS_FAILED(rv))
|
||||
ClearRequest(copyRequest, rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче