summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorBoris Zbarsky <bzbarsky@mit.edu>2018-03-13 00:59:23 -0400
committerwolfbeast <mcwerewolf@gmail.com>2018-04-19 11:35:08 +0200
commit2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558 (patch)
tree0f5ebf400e1d1ec6e4093764929a1d0384d6efde /dom
parente01e302f1095908f9d0c8ebe0fde6cc7a5d84d69 (diff)
downloadUXP-2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558.tar
UXP-2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558.tar.gz
UXP-2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558.tar.lz
UXP-2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558.tar.xz
UXP-2b020e9bbbc54f9c1bb44ef94a8e4382ca0a6558.zip
Bug 1444231 - Fix QI implementation for FragmentOrElement. r=mccr8, a=RyanVM
MozReview-Commit-ID: 9mPO2ezk2Y7 --HG-- extra : source : 060024fa93121d878d27f329c959757e6f71017a extra : intermediate-source : 925d5693c5a1a73806062947b18c98ed13efc6c3
Diffstat (limited to 'dom')
-rw-r--r--dom/base/Element.cpp6
-rw-r--r--dom/base/FragmentOrElement.cpp1
2 files changed, 6 insertions, 1 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 9ced64c0d..8b9808aa3 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -183,6 +183,12 @@ Element::DoGetClasses() const
NS_IMETHODIMP
Element::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
+ if (aIID.Equals(NS_GET_IID(Element))) {
+ NS_ADDREF_THIS();
+ *aInstancePtr = this;
+ return NS_OK;
+ }
+
NS_ASSERTION(aInstancePtr,
"QueryInterface requires a non-NULL destination!");
nsresult rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr);
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
index 79f6cff51..b22a0d4ff 100644
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1937,7 +1937,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN(FragmentOrElement)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(FragmentOrElement)
- NS_INTERFACE_MAP_ENTRY(Element)
NS_INTERFACE_MAP_ENTRY(nsIContent)
NS_INTERFACE_MAP_ENTRY(nsINode)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)