Bug 1478372, remove unneeded QueryInterface implementation for custom XUL elements as this is now done by nsXULElement::QueryInterface, r=bgrins
This commit is contained in:
@@ -110,9 +110,8 @@ class MozXULElement extends XULElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that a class defining an element implements one or more
|
||||
* XPCOM interfaces. The custom element getCustomInterface is added
|
||||
* as well as an implementation of QueryInterface.
|
||||
* Indicate that a class defining a XUL element implements one or more
|
||||
* XPCOM interfaces by adding a getCustomInterface implementation to it.
|
||||
*
|
||||
* The supplied class should implement the properties and methods of
|
||||
* all of the interfaces that are specified.
|
||||
@@ -120,10 +119,9 @@ class MozXULElement extends XULElement {
|
||||
* @param cls
|
||||
* The class that implements the interface.
|
||||
* @param names
|
||||
* Array of interface names
|
||||
* Array of interface names.
|
||||
*/
|
||||
static implementCustomInterface(cls, ifaces) {
|
||||
cls.prototype.QueryInterface = ChromeUtils.generateQI(ifaces);
|
||||
cls.prototype.getCustomInterfaceCallback = function getCustomInterfaceCallback(iface) {
|
||||
if (ifaces.includes(Ci[Components.interfacesByID[iface.number]])) {
|
||||
return getInterfaceProxy(this);
|
||||
|
||||
Reference in New Issue
Block a user