Bug 1035650, part 2: Fix public destructors in compose, r=Neil
Also split out due to non-trivial changes.
This commit is contained in:
Родитель
ca1a1063f2
Коммит
01cb79cb32
|
@ -96,4 +96,16 @@ public:
|
|||
uint32_t m_nullCount;
|
||||
uint32_t m_maxLineLength;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
template <> struct HasDangerousPublicDestructor<nsMsgAttachmentData>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
template <> struct HasDangerousPublicDestructor<nsMsgAttachedFile>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,9 +16,9 @@ public:
|
|||
NS_DECL_NSIMSGATTACHMENT
|
||||
|
||||
nsMsgAttachment();
|
||||
virtual ~nsMsgAttachment();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgAttachment();
|
||||
nsresult DeleteAttachment();
|
||||
|
||||
nsString mName;
|
||||
|
|
|
@ -30,7 +30,6 @@ struct nsMsgRecipient
|
|||
class nsMsgCompFields : public nsIMsgCompFields {
|
||||
public:
|
||||
nsMsgCompFields();
|
||||
virtual ~nsMsgCompFields();
|
||||
|
||||
/* this macro defines QueryInterface, AddRef and Release for this class */
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
@ -140,6 +139,7 @@ public:
|
|||
nsTArray<nsMsgRecipient> &aResult);
|
||||
|
||||
protected:
|
||||
virtual ~nsMsgCompFields();
|
||||
char* m_headers[MSG_MAX_HEADERS];
|
||||
nsCString m_body;
|
||||
nsCOMArray<nsIMsgAttachment> m_attachments;
|
||||
|
|
|
@ -29,6 +29,8 @@ public:
|
|||
NS_DECL_NSIMSGCOMPUTILS
|
||||
|
||||
nsMsgCompUtils();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgCompUtils();
|
||||
};
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ class nsMsgCompose : public nsIMsgCompose, public nsSupportsWeakReference
|
|||
public:
|
||||
|
||||
nsMsgCompose();
|
||||
virtual ~nsMsgCompose();
|
||||
|
||||
/* this macro defines QueryInterface, AddRef and Release for this class */
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
@ -47,6 +46,7 @@ class nsMsgCompose : public nsIMsgCompose, public nsSupportsWeakReference
|
|||
NS_DECL_NSIMSGSENDLISTENER
|
||||
|
||||
private:
|
||||
virtual ~nsMsgCompose();
|
||||
|
||||
// Deal with quoting issues...
|
||||
nsresult QuoteOriginalMessage(); // New template
|
||||
|
@ -153,7 +153,6 @@ public:
|
|||
bool charetOverride,
|
||||
bool quoteOriginal,
|
||||
const nsACString& htmlToQuote);
|
||||
virtual ~QuotingOutputStreamListener(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
@ -166,6 +165,7 @@ public:
|
|||
NS_IMETHOD AppendToMsgBody(const nsCString &inStr);
|
||||
|
||||
private:
|
||||
virtual ~QuotingOutputStreamListener();
|
||||
nsWeakPtr mWeakComposeObj;
|
||||
nsString mMsgBody;
|
||||
nsString mCitePrefix;
|
||||
|
@ -192,7 +192,6 @@ class nsMsgComposeSendListener : public nsIMsgComposeSendListener, public nsIMsg
|
|||
{
|
||||
public:
|
||||
nsMsgComposeSendListener(void);
|
||||
virtual ~nsMsgComposeSendListener(void);
|
||||
|
||||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -213,6 +212,7 @@ public:
|
|||
nsresult GetMsgFolder(nsIMsgCompose *compObj, nsIMsgFolder **msgFolder);
|
||||
|
||||
private:
|
||||
virtual ~nsMsgComposeSendListener();
|
||||
nsWeakPtr mWeakComposeObj;
|
||||
MSG_DeliverMode mDeliverMode;
|
||||
};
|
||||
|
|
|
@ -10,11 +10,11 @@ class nsMsgComposeContentHandler : public nsIContentHandler
|
|||
{
|
||||
public:
|
||||
nsMsgComposeContentHandler();
|
||||
virtual ~nsMsgComposeContentHandler();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICONTENTHANDLER
|
||||
private:
|
||||
virtual ~nsMsgComposeContentHandler();
|
||||
nsresult GetBestIdentity(nsIInterfaceRequestor* aWindowContext,
|
||||
nsIMsgIdentity **identity);
|
||||
};
|
||||
|
|
|
@ -11,11 +11,12 @@ class nsMsgComposeParams : public nsIMsgComposeParams
|
|||
{
|
||||
public:
|
||||
nsMsgComposeParams();
|
||||
virtual ~nsMsgComposeParams();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIMSGCOMPOSEPARAMS
|
||||
|
||||
private:
|
||||
virtual ~nsMsgComposeParams();
|
||||
MSG_ComposeType mType;
|
||||
MSG_ComposeFormat mFormat;
|
||||
nsCString mOriginalMsgUri;
|
||||
|
|
|
@ -12,9 +12,9 @@ public:
|
|||
NS_DECL_NSIMSGCOMPOSEPROGRESSPARAMS
|
||||
|
||||
nsMsgComposeProgressParams();
|
||||
virtual ~nsMsgComposeProgressParams();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgComposeProgressParams();
|
||||
nsString m_subject;
|
||||
MSG_DeliverMode m_deliveryMode;
|
||||
};
|
||||
|
|
|
@ -876,7 +876,8 @@ nsMsgComposeService::CacheWindow(nsIDOMWindow *aWindow, bool aComposeHTML, nsIMs
|
|||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
class nsMsgTemplateReplyHelper : public nsIStreamListener, public nsIUrlListener
|
||||
class nsMsgTemplateReplyHelper MOZ_FINAL: public nsIStreamListener,
|
||||
public nsIUrlListener
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -885,7 +886,6 @@ public:
|
|||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
||||
nsMsgTemplateReplyHelper();
|
||||
~nsMsgTemplateReplyHelper();
|
||||
|
||||
nsCOMPtr <nsIMsgDBHdr> mHdrToReplyTo;
|
||||
nsCOMPtr <nsIMsgDBHdr> mTemplateHdr;
|
||||
|
@ -894,6 +894,9 @@ public:
|
|||
nsCString mTemplateBody;
|
||||
bool mInMsgBody;
|
||||
char mLastBlockChars[3];
|
||||
|
||||
private:
|
||||
~nsMsgTemplateReplyHelper();
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsMsgTemplateReplyHelper,
|
||||
|
|
|
@ -48,7 +48,6 @@ class nsMsgComposeService :
|
|||
{
|
||||
public:
|
||||
nsMsgComposeService();
|
||||
virtual ~nsMsgComposeService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIMSGCOMPOSESERVICE
|
||||
|
@ -61,6 +60,7 @@ public:
|
|||
nsresult AddGlobalHtmlDomains();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgComposeService();
|
||||
bool mLogComposePerformance;
|
||||
|
||||
int32_t mMaxRecycledWindows;
|
||||
|
|
|
@ -31,7 +31,6 @@ class CopyListener : public nsIMsgCopyServiceListener
|
|||
{
|
||||
public:
|
||||
CopyListener(void);
|
||||
virtual ~CopyListener(void);
|
||||
|
||||
// nsISupports interface
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
@ -51,6 +50,7 @@ public:
|
|||
bool mCopyInProgress;
|
||||
|
||||
private:
|
||||
virtual ~CopyListener();
|
||||
nsCOMPtr<nsIMsgSend> mComposeAndSend;
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,6 @@ class nsMsgCopy : public nsIUrlListener
|
|||
{
|
||||
public:
|
||||
nsMsgCopy();
|
||||
virtual ~nsMsgCopy();
|
||||
|
||||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -102,6 +101,9 @@ public:
|
|||
bool mIsDraft;
|
||||
nsCOMPtr<nsIMsgSend> mMsgSendObj;
|
||||
char *mSavePref;
|
||||
|
||||
private:
|
||||
virtual ~nsMsgCopy();
|
||||
};
|
||||
|
||||
// Useful function for the back end...
|
||||
|
|
|
@ -19,7 +19,6 @@ class nsMsgQuoteListener: public nsIMsgQuoteListener
|
|||
{
|
||||
public:
|
||||
nsMsgQuoteListener();
|
||||
virtual ~nsMsgQuoteListener();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
|
@ -28,17 +27,19 @@ public:
|
|||
NS_DECL_NSIMSGQUOTELISTENER
|
||||
|
||||
private:
|
||||
virtual ~nsMsgQuoteListener();
|
||||
nsWeakPtr mMsgQuote;
|
||||
};
|
||||
|
||||
class nsMsgQuote: public nsIMsgQuote, public nsSupportsWeakReference {
|
||||
public:
|
||||
nsMsgQuote();
|
||||
virtual ~nsMsgQuote();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIMSGQUOTE
|
||||
|
||||
private:
|
||||
virtual ~nsMsgQuote();
|
||||
//
|
||||
// Implementation data...
|
||||
//
|
||||
|
|
|
@ -200,12 +200,12 @@ class MsgDeliveryListener : public nsIUrlListener
|
|||
{
|
||||
public:
|
||||
MsgDeliveryListener(nsIMsgSend *aMsgSend, bool inIsNewsDelivery);
|
||||
virtual ~MsgDeliveryListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIURLLISTENER
|
||||
|
||||
private:
|
||||
virtual ~MsgDeliveryListener();
|
||||
nsCOMPtr<nsIMsgSend> mMsgSend;
|
||||
bool mIsNewsDelivery;
|
||||
};
|
||||
|
@ -1477,7 +1477,7 @@ nsMsgComposeAndSend::GetMultipartRelatedCount(bool forceToBeCalculated /*=false*
|
|||
// preallocate space for part numbers
|
||||
m_partNumbers.SetLength(count);
|
||||
// Let parse the list to count the number of valid objects. BTW, we can remove the others from the list
|
||||
nsMsgAttachmentData attachment;
|
||||
nsRefPtr<nsMsgAttachmentData> attachment(new nsMsgAttachmentData);
|
||||
|
||||
int32_t i;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
|
@ -1493,7 +1493,7 @@ nsMsgComposeAndSend::GetMultipartRelatedCount(bool forceToBeCalculated /*=false*
|
|||
bool acceptObject = false;
|
||||
if (node)
|
||||
{
|
||||
rv = GetEmbeddedObjectInfo(node, &attachment, &acceptObject);
|
||||
rv = GetEmbeddedObjectInfo(node, attachment, &acceptObject);
|
||||
}
|
||||
else // outlook/eudora import case
|
||||
{
|
||||
|
@ -1788,7 +1788,7 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
|
|||
if (!mEmbeddedObjectList)
|
||||
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
||||
|
||||
nsMsgAttachmentData attachment;
|
||||
nsRefPtr<nsMsgAttachmentData> attachment(new nsMsgAttachmentData);
|
||||
int32_t locCount = -1;
|
||||
|
||||
if (multipartCount > 0)
|
||||
|
@ -1811,7 +1811,7 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
|
|||
if (node)
|
||||
{
|
||||
bool acceptObject = false;
|
||||
rv = GetEmbeddedObjectInfo(node, &attachment, &acceptObject);
|
||||
rv = GetEmbeddedObjectInfo(node, attachment, &acceptObject);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_MIME_MPART_ATTACHMENT_ERROR);
|
||||
if (!acceptObject)
|
||||
continue;
|
||||
|
@ -1824,11 +1824,11 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
|
|||
nsCOMPtr<nsIMsgEmbeddedImageData> imageData = do_QueryElementAt(mEmbeddedObjectList, locCount, &rv);
|
||||
if (!imageData)
|
||||
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
||||
imageData->GetUri(getter_AddRefs(attachment.m_url));
|
||||
if (!attachment.m_url)
|
||||
imageData->GetUri(getter_AddRefs(attachment->m_url));
|
||||
if (!attachment->m_url)
|
||||
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
||||
imageData->GetCid(m_attachments[i]->m_contentId);
|
||||
imageData->GetName(attachment.m_realName);
|
||||
imageData->GetName(attachment->m_realName);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1848,9 +1848,9 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
|
|||
for (k = mPreloadedAttachmentCount; k < i; k++)
|
||||
{
|
||||
bool isEqual = false;
|
||||
NS_ASSERTION(attachment.m_url, "null attachment url!");
|
||||
if (attachment.m_url)
|
||||
(void)attachment.m_url->Equals(m_attachments[k]->mURL, &isEqual);
|
||||
NS_ASSERTION(attachment->m_url, "null attachment url!");
|
||||
if (attachment->m_url)
|
||||
(void)attachment->m_url->Equals(m_attachments[k]->mURL, &isEqual);
|
||||
if (isEqual)
|
||||
{
|
||||
duplicateOf = k;
|
||||
|
@ -1863,15 +1863,15 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
|
|||
//
|
||||
// Now we have to get all of the interesting information from
|
||||
// the nsIDOMNode we have in hand...
|
||||
m_attachments[i]->mURL = attachment.m_url;
|
||||
m_attachments[i]->mURL = attachment->m_url;
|
||||
|
||||
m_attachments[i]->m_overrideType = attachment.m_realType;
|
||||
m_attachments[i]->m_overrideEncoding = attachment.m_realEncoding;
|
||||
m_attachments[i]->m_desiredType = attachment.m_desiredType;
|
||||
m_attachments[i]->m_description = attachment.m_description;
|
||||
m_attachments[i]->m_realName = attachment.m_realName;
|
||||
m_attachments[i]->m_xMacType = attachment.m_xMacType;
|
||||
m_attachments[i]->m_xMacCreator = attachment.m_xMacCreator;
|
||||
m_attachments[i]->m_overrideType = attachment->m_realType;
|
||||
m_attachments[i]->m_overrideEncoding = attachment->m_realEncoding;
|
||||
m_attachments[i]->m_desiredType = attachment->m_desiredType;
|
||||
m_attachments[i]->m_description = attachment->m_description;
|
||||
m_attachments[i]->m_realName = attachment->m_realName;
|
||||
m_attachments[i]->m_xMacType = attachment->m_xMacType;
|
||||
m_attachments[i]->m_xMacCreator = attachment->m_xMacCreator;
|
||||
|
||||
m_attachments[i]->m_charset = mCompFields->GetCharacterSet();
|
||||
m_attachments[i]->m_encoding = ENCODING_7BIT;
|
||||
|
|
|
@ -172,7 +172,6 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
nsMsgComposeAndSend();
|
||||
virtual ~nsMsgComposeAndSend();
|
||||
|
||||
|
||||
// Delivery and completion callback routines...
|
||||
|
@ -368,6 +367,7 @@ protected:
|
|||
nsCOMPtr<nsIStringBundle> mComposeBundle;
|
||||
nsresult GetNotificationCallbacks(nsIInterfaceRequestor** aCallbacks);
|
||||
private:
|
||||
virtual ~nsMsgComposeAndSend();
|
||||
// will set m_attachment1_body & m_attachment1_body_length;
|
||||
nsresult EnsureLineBreaks(const nsCString &aBody);
|
||||
|
||||
|
|
|
@ -28,13 +28,13 @@ class SendOperationListener : public nsIMsgSendListener,
|
|||
{
|
||||
public:
|
||||
SendOperationListener(nsMsgSendLater *aSendLater);
|
||||
virtual ~SendOperationListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIMSGSENDLISTENER
|
||||
NS_DECL_NSIMSGCOPYSERVICELISTENER
|
||||
|
||||
private:
|
||||
virtual ~SendOperationListener();
|
||||
nsMsgSendLater *mSendLater;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,6 @@ class nsMsgSendLater: public nsIMsgSendLater,
|
|||
{
|
||||
public:
|
||||
nsMsgSendLater();
|
||||
virtual ~nsMsgSendLater();
|
||||
nsresult Init();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -99,6 +98,7 @@ public:
|
|||
|
||||
// Private Information
|
||||
private:
|
||||
virtual ~nsMsgSendLater();
|
||||
nsresult GetIdentityFromKey(const char *aKey, nsIMsgIdentity **aIdentity);
|
||||
nsresult ReparseDBIfNeeded(nsIUrlListener *aListener);
|
||||
nsresult InternalSendMessages(bool aUserInitiated,
|
||||
|
|
|
@ -17,9 +17,9 @@ public:
|
|||
NS_DECL_NSIMSGPROCESSREPORT
|
||||
|
||||
nsMsgProcessReport();
|
||||
virtual ~nsMsgProcessReport();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgProcessReport();
|
||||
bool mProceeded;
|
||||
nsresult mError;
|
||||
nsString mMessage;
|
||||
|
@ -33,9 +33,9 @@ public:
|
|||
NS_DECL_NSIMSGSENDREPORT
|
||||
|
||||
nsMsgSendReport();
|
||||
virtual ~nsMsgSendReport();
|
||||
|
||||
private:
|
||||
virtual ~nsMsgSendReport();
|
||||
#define SEND_LAST_PROCESS process_FCC
|
||||
nsCOMPtr<nsIMsgProcessReport> mProcessReport[SEND_LAST_PROCESS + 1];
|
||||
int32_t mDeliveryMode;
|
||||
|
|
|
@ -17,12 +17,12 @@ class nsSmtpServer : public nsISmtpServer,
|
|||
{
|
||||
public:
|
||||
nsSmtpServer();
|
||||
virtual ~nsSmtpServer();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISMTPSERVER
|
||||
|
||||
private:
|
||||
virtual ~nsSmtpServer();
|
||||
nsCString mKey;
|
||||
nsCOMPtr<nsIPrefBranch> mPrefBranch;
|
||||
nsCOMPtr<nsIPrefBranch> mDefPrefBranch;
|
||||
|
|
|
@ -25,7 +25,6 @@ class nsSmtpService : public nsISmtpService, public nsIProtocolHandler
|
|||
public:
|
||||
|
||||
nsSmtpService();
|
||||
virtual ~nsSmtpService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -44,6 +43,7 @@ protected:
|
|||
|
||||
|
||||
private:
|
||||
virtual ~nsSmtpService();
|
||||
static bool findServerByKey(nsISmtpServer *aServer, void *aData);
|
||||
static bool findServerByHostname(nsISmtpServer *aServer, void *aData);
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ class nsURLFetcher : public nsIURLFetcher,
|
|||
{
|
||||
public:
|
||||
nsURLFetcher();
|
||||
virtual ~nsURLFetcher();
|
||||
|
||||
/* this macro defines QueryInterface, AddRef and Release for this class */
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -58,6 +57,7 @@ protected:
|
|||
nsresult InsertConverter(const char * aContentType);
|
||||
|
||||
private:
|
||||
virtual ~nsURLFetcher();
|
||||
nsCOMPtr<nsIOutputStream> mOutStream; // the output file stream
|
||||
nsCOMPtr<nsIFile> mLocalFile; // the output file itself
|
||||
nsCOMPtr<nsIStreamListener> mConverter; // the stream converter, if needed
|
||||
|
@ -86,7 +86,6 @@ class nsURLFetcherStreamConsumer : public nsIStreamListener
|
|||
{
|
||||
public:
|
||||
nsURLFetcherStreamConsumer(nsURLFetcher* urlFetcher);
|
||||
virtual ~nsURLFetcherStreamConsumer();
|
||||
|
||||
/* additional members */
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -94,6 +93,7 @@ public:
|
|||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
||||
private:
|
||||
virtual ~nsURLFetcherStreamConsumer();
|
||||
nsURLFetcher* mURLFetcher;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче