cleanup temp files in compose window, r=hiro, sr=standard, part of bug 671440
This commit is contained in:
Родитель
983d2acfa7
Коммит
16936a6cda
|
@ -99,7 +99,7 @@ interface nsIMsgComposeRecyclingListener : nsISupports {
|
|||
void onReopen(in nsIMsgComposeParams params);
|
||||
};
|
||||
|
||||
[scriptable, uuid(fc9dc1dc-7726-4d29-bb92-a0227f526651)]
|
||||
[scriptable, uuid(6d04ec94-0277-45f0-b71a-08606ad24916)]
|
||||
interface nsIMsgCompose : nsIMsgSendListener {
|
||||
|
||||
/**
|
||||
|
@ -180,10 +180,15 @@ interface nsIMsgCompose : nsIMsgSendListener {
|
|||
*/
|
||||
boolean checkCharsetConversion(in nsIMsgIdentity identity, out string fallbackCharset);
|
||||
|
||||
/* Retreive the message send object */
|
||||
/* the message send object */
|
||||
readonly attribute nsIMsgSend messageSend;
|
||||
|
||||
/* ... */
|
||||
|
||||
/*
|
||||
* Clear the messageSend object to break any circular references
|
||||
*/
|
||||
void clearMessageSend();
|
||||
|
||||
/* ... */
|
||||
readonly attribute nsIEditor editor;
|
||||
|
||||
/* ... */
|
||||
|
|
|
@ -1191,6 +1191,7 @@ nsMsgAttachmentHandler::UrlExit(nsresult status, const PRUnichar* aMsg)
|
|||
if ( (!next->mURL) && (next->m_uri.IsEmpty()) )
|
||||
{
|
||||
attachments[i].m_done = true;
|
||||
attachments[i].SetMimeDeliveryState(nsnull);
|
||||
m_mime_delivery_state->GetPendingAttachmentCount(&pendingAttachmentCount);
|
||||
m_mime_delivery_state->SetPendingAttachmentCount(pendingAttachmentCount - 1);
|
||||
next->mPartUserOmissionOverride = true;
|
||||
|
|
|
@ -2270,6 +2270,12 @@ NS_IMETHODIMP nsMsgCompose::GetMessageSend(nsIMsgSend **_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgCompose::ClearMessageSend()
|
||||
{
|
||||
mMsgSend = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgCompose::SetCiteReference(nsString citeReference)
|
||||
{
|
||||
mCiteReference = citeReference;
|
||||
|
@ -3765,6 +3771,7 @@ nsMsgComposeSendListener::OnStopCopy(nsresult aStatus)
|
|||
msgCompose->CloseWindow(true);
|
||||
}
|
||||
}
|
||||
msgCompose->ClearMessageSend();
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -1943,7 +1943,10 @@ nsMsgComposeAndSend::ProcessMultipartRelated(PRInt32 *aMailboxCount, PRInt32 *aN
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_attachments[i].m_contentId = m_attachments[duplicateOf].m_contentId;
|
||||
m_attachments[i].SetMimeDeliveryState(nsnull);
|
||||
}
|
||||
|
||||
//
|
||||
// Ok, while we are here, we should whack the DOM with the generated
|
||||
|
|
|
@ -63,19 +63,12 @@ function check_files_not_exist(files) {
|
|||
});
|
||||
}
|
||||
|
||||
function check_files_exist(files) {
|
||||
files.forEach(function(file) {
|
||||
do_check_true(file.exists());
|
||||
});
|
||||
}
|
||||
|
||||
function check_result() {
|
||||
check_files_exist(gExpectedFiles);
|
||||
// temp files should be deleted as soon as the draft is finished saving.
|
||||
check_files_not_exist(gExpectedFiles);
|
||||
|
||||
gMsgCompose.CloseWindow(true);
|
||||
|
||||
check_files_not_exist(gExpectedFiles);
|
||||
|
||||
do_test_finished();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче