summaryrefslogtreecommitdiffstats
path: root/dom/messagechannel/MessagePortParent.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-29 14:55:20 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-29 14:55:20 +0000
commit745254183c226e5db0caa566ad496d2f0192182e (patch)
tree467b282ce4e90dba6837dd9d631b6c9082463274 /dom/messagechannel/MessagePortParent.h
parentc76214f0b54cf74b69d0fb4afa0d2eca2e898a98 (diff)
parente1daeef18312a0cb17eda6bed7f363d8748ed4a3 (diff)
downloadUXP-745254183c226e5db0caa566ad496d2f0192182e.tar
UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.gz
UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.lz
UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.xz
UXP-745254183c226e5db0caa566ad496d2f0192182e.zip
Merge branch 'master' into release
Diffstat (limited to 'dom/messagechannel/MessagePortParent.h')
-rw-r--r--dom/messagechannel/MessagePortParent.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/messagechannel/MessagePortParent.h b/dom/messagechannel/MessagePortParent.h
index 4cbebe29b..23195c3a7 100644
--- a/dom/messagechannel/MessagePortParent.h
+++ b/dom/messagechannel/MessagePortParent.h
@@ -5,6 +5,7 @@
#ifndef mozilla_dom_MessagePortParent_h
#define mozilla_dom_MessagePortParent_h
+#include "mozilla/WeakPtr.h"
#include "mozilla/dom/PMessagePortParent.h"
namespace mozilla {
@@ -12,7 +13,8 @@ namespace dom {
class MessagePortService;
-class MessagePortParent final : public PMessagePortParent
+class MessagePortParent final : public PMessagePortParent,
+ public SupportsWeakPtr<MessagePortParent>
{
public:
explicit MessagePortParent(const nsID& aUUID);
@@ -40,6 +42,8 @@ public:
const nsID& aDestinationUUID,
const uint32_t& aSequenceID);
+ MOZ_DECLARE_WEAKREFERENCE_TYPENAME(MessagePortParent)
+
private:
virtual bool RecvPostMessages(nsTArray<MessagePortMessage>&& aMessages)
override;