summaryrefslogtreecommitdiff
path: root/dom/messagechannel/MessagePortParent.h
diff options
context:
space:
mode:
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;