mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
If a class claims to support an interface in QueryInterface() it *really* should inherit from that interface then! Fixes #35398.
This commit is contained in:
parent
e6bdff2357
commit
801bd7da0e
@ -38,6 +38,7 @@
|
|||||||
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
||||||
|
|
||||||
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
||||||
|
public nsIDOMNSHTMLAreaElement,
|
||||||
public nsIJSScriptObject,
|
public nsIJSScriptObject,
|
||||||
public nsIHTMLContent
|
public nsIHTMLContent
|
||||||
{
|
{
|
||||||
@ -137,7 +138,8 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
||||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAreaElement*) this;
|
nsIDOMNSHTMLAreaElement* tmp = this;
|
||||||
|
*aInstancePtr = (void*) tmp;
|
||||||
NS_ADDREF_THIS();
|
NS_ADDREF_THIS();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
||||||
|
|
||||||
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
||||||
|
public nsIDOMNSHTMLAreaElement,
|
||||||
public nsIJSScriptObject,
|
public nsIJSScriptObject,
|
||||||
public nsIHTMLContent
|
public nsIHTMLContent
|
||||||
{
|
{
|
||||||
@ -137,7 +138,8 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
||||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAreaElement*) this;
|
nsIDOMNSHTMLAreaElement* tmp = this;
|
||||||
|
*aInstancePtr = (void*) tmp;
|
||||||
NS_ADDREF_THIS();
|
NS_ADDREF_THIS();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user