Bug 1632847 - Port bug 1632021 to Thunderbird (Avoid QI between transaction classes). rs=bustage-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 24 Apr 2020 17:06:56 +0300
changeset 29390 531719d2693029df21319432561bf31f190471ea
parent 29389 e4f4231ef04baf8869d3df9e3601c368bf951a65
child 29391 274dd8d1e772b19acd32ff1d575a1c5939a0dd5b
push id17343
push usermkmelin@iki.fi
push dateFri, 24 Apr 2020 14:12:02 +0000
treeherdercomm-central@531719d26930 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1632847, 1632021
Bug 1632847 - Port bug 1632021 to Thunderbird (Avoid QI between transaction classes). rs=bustage-fix
mailnews/base/util/nsMsgTxn.h
--- a/mailnews/base/util/nsMsgTxn.h
+++ b/mailnews/base/util/nsMsgTxn.h
@@ -12,16 +12,20 @@
 #include "nsCOMPtr.h"
 #include "nsIMsgWindow.h"
 #include "nsInterfaceHashtable.h"
 #include "MailNewsTypes2.h"
 #include "nsIVariant.h"
 #include "nsIWritablePropertyBag.h"
 #include "nsIWritablePropertyBag2.h"
 
+#include "mozilla/EditTransactionBase.h"
+
+using mozilla::EditTransactionBase;
+
 #define NS_MESSAGETRANSACTION_IID                    \
   { /* da621b30-1efc-11d3-abe4-00805f8ac968 */       \
     0xda621b30, 0x1efc, 0x11d3, {                    \
       0xab, 0xe4, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 \
     }                                                \
   }
 /**
  * base class for all message undo/redo transactions.
@@ -50,16 +54,20 @@ class NS_MSG_BASE nsMsgTxn : public nsIT
   nsresult SetTransactionType(uint32_t txnType);
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPROPERTYBAG
   NS_DECL_NSIPROPERTYBAG2
   NS_DECL_NSIWRITABLEPROPERTYBAG
   NS_DECL_NSIWRITABLEPROPERTYBAG2
 
+  NS_IMETHOD GetAsEditTransactionBase(EditTransactionBase**) final {
+    return NS_ERROR_NOT_IMPLEMENTED;
+  }
+
  protected:
   virtual ~nsMsgTxn();
 
   // a hash table of string -> nsIVariant
   nsInterfaceHashtable<nsStringHashKey, nsIVariant> mPropertyHash;
   nsCOMPtr<nsIMsgWindow> m_msgWindow;
   uint32_t m_txnType;
   nsresult CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey,