mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Bug 1396568 - Make DocumentFragment::mHost a strong reference (so that ShadowRoot.host doesn't become null)
Tag #1375
This commit is contained in:
parent
390ef42e80
commit
cc649173d2
4 changed files with 14 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue