summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/PlaceholderTransaction.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:45:53 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:45:53 -0400
commitea3a2ce279f92457bfd6168f97b106be193ea740 (patch)
treee16a1be460feee615ade9b680fd00a171c8b90cd /editor/libeditor/PlaceholderTransaction.h
parent5a379a4b15b4da55f5fda0be56c43a85e0162f05 (diff)
downloadUXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar
UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.gz
UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.lz
UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.xz
UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.zip
Bug 1372829 - Part 1: Make mozilla::PlaceholderTransaction inherit mozilla::SupportsWeakPtr instead of nsSupportsWeakReference
Tag #1375
Diffstat (limited to 'editor/libeditor/PlaceholderTransaction.h')
-rw-r--r--editor/libeditor/PlaceholderTransaction.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/editor/libeditor/PlaceholderTransaction.h b/editor/libeditor/PlaceholderTransaction.h
index 7e592cc03..5fa58a1e9 100644
--- a/editor/libeditor/PlaceholderTransaction.h
+++ b/editor/libeditor/PlaceholderTransaction.h
@@ -9,6 +9,7 @@
#include "EditAggregateTransaction.h"
#include "mozilla/EditorUtils.h"
#include "mozilla/UniquePtr.h"
+#include "mozilla/WeakPtr.h"
#include "nsIAbsorbingTransaction.h"
#include "nsIDOMNode.h"
#include "nsCOMPtr.h"
@@ -26,11 +27,14 @@ class CompositionTransaction;
* transactions it has absorbed.
*/
-class PlaceholderTransaction final : public EditAggregateTransaction,
- public nsIAbsorbingTransaction,
- public nsSupportsWeakReference
+class PlaceholderTransaction final
+ : public EditAggregateTransaction
+ , public nsIAbsorbingTransaction
+ , public SupportsWeakPtr<PlaceholderTransaction>
{
public:
+ MOZ_DECLARE_WEAKREFERENCE_TYPENAME(PlaceholderTransaction)
+
NS_DECL_ISUPPORTS_INHERITED
PlaceholderTransaction(EditorBase& aEditorBase, nsIAtom* aName,
@@ -59,6 +63,11 @@ public:
NS_IMETHOD Commit() override;
+ NS_IMETHOD_(PlaceholderTransaction*) AsPlaceholderTransaction() override
+ {
+ return this;
+ }
+
nsresult RememberEndingSelection();
protected: