diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:15:38 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:15:38 -0400 |
commit | 8114d58fee29120ab4a7af7bd9b5c77252ab1d86 (patch) | |
tree | 8389b1c820801d8784a19e0e6d79471f29e5a3b4 /dom/base/DocumentFragment.h | |
parent | 071957f9fab1f5065730c79ccc46a660ace35569 (diff) | |
download | UXP-8114d58fee29120ab4a7af7bd9b5c77252ab1d86.tar UXP-8114d58fee29120ab4a7af7bd9b5c77252ab1d86.tar.gz UXP-8114d58fee29120ab4a7af7bd9b5c77252ab1d86.tar.lz UXP-8114d58fee29120ab4a7af7bd9b5c77252ab1d86.tar.xz UXP-8114d58fee29120ab4a7af7bd9b5c77252ab1d86.zip |
Bug 1396568 - Make DocumentFragment::mHost a strong reference (so that ShadowRoot.host doesn't become null)
Tag #1375
Diffstat (limited to 'dom/base/DocumentFragment.h')
-rw-r--r-- | dom/base/DocumentFragment.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dom/base/DocumentFragment.h b/dom/base/DocumentFragment.h index 68a7f0ff4..33d8d4d9d 100644 --- a/dom/base/DocumentFragment.h +++ b/dom/base/DocumentFragment.h @@ -43,6 +43,8 @@ public: // nsISupports NS_DECL_ISUPPORTS_INHERITED + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DocumentFragment, + FragmentOrElement) // interface nsIDOMNode NS_FORWARD_NSIDOMNODE_TO_NSINODE @@ -121,12 +123,12 @@ public: return nullptr; } - nsIContent* GetHost() const + Element* GetHost() const { return mHost; } - void SetHost(nsIContent* aHost) + void SetHost(Element* aHost) { mHost = aHost; } @@ -145,7 +147,7 @@ protected: } nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override; - nsIContent* mHost; // Weak + nsCOMPtr<Element> mHost; }; } // namespace dom |