зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e6bdff2357
Коммит
801bd7da0e
|
@ -38,6 +38,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
||||
|
||||
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
||||
public nsIDOMNSHTMLAreaElement,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
|
@ -137,7 +138,8 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
return NS_OK;
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAreaElement*) this;
|
||||
nsIDOMNSHTMLAreaElement* tmp = this;
|
||||
*aInstancePtr = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
||||
|
||||
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
||||
public nsIDOMNSHTMLAreaElement,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
|
@ -137,7 +138,8 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
return NS_OK;
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAreaElement*) this;
|
||||
nsIDOMNSHTMLAreaElement* tmp = this;
|
||||
*aInstancePtr = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче