Backed out changeset 2add2de30c22 (bug 1456035)
authorKris Maglione <maglione.k@gmail.com>
Fri, 27 Apr 2018 13:44:36 -0700
changeset 416158 abedb29f91fd6b736ed109dcefad1951450c7271
parent 416157 e4ce5e759df5b08bfc1bf5f5f5f4892cf46b0dad
child 416159 c58f0b4dd8494f4a81c69b0315af223576660200
push id33917
push userapavel@mozilla.com
push dateSat, 28 Apr 2018 17:30:55 +0000
treeherdermozilla-central@08f68e2c892c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1456035
milestone61.0a1
backs out2add2de30c229733a3d0f11843695fcda818fe94
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2add2de30c22 (bug 1456035) MozReview-Commit-ID: 15Whk6URI2O
js/xpconnect/loader/XPCOMUtils.jsm
--- a/js/xpconnect/loader/XPCOMUtils.jsm
+++ b/js/xpconnect/loader/XPCOMUtils.jsm
@@ -562,49 +562,8 @@ var XPCOMUtils = {
 var XPCU_lazyPreferenceObserverQI = XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]);
 
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(XPCOMUtils, "categoryManager",
                                    "@mozilla.org/categorymanager;1",
                                    "nsICategoryManager");
-
-// FIXME: Remove this when Android hostutils is updated to support
-// ChromeUtils.generateQI.
-if (ChromeUtils.generateQI) {
-  XPCOMUtils.generateQI = function(interfaces) {
-    return ChromeUtils.generateQI(interfaces.filter(i => i && i.name != "nsISupports"));
-  };
-} else {
-  /**
-   * Helper for XPCOMUtils.generateQI to avoid leaks - see bug 381651#c1
-   */
-  let makeQI = (interfaceNames) => {
-    return function XPCOMUtils_QueryInterface(iid) {
-      if (iid.equals(Ci.nsISupports))
-        return this;
-      if (iid.equals(Ci.nsIClassInfo) && "classInfo" in this)
-        return this.classInfo;
-      for (let i = 0; i < interfaceNames.length; i++) {
-        if (Ci[interfaceNames[i]].equals(iid))
-          return this;
-      }
-
-      throw Cr.NS_ERROR_NO_INTERFACE;
-    };
-  };
-
-  XPCOMUtils.generateQI = function(interfaces) {
-    /* Note that Ci[Ci.x] == Ci.x for all x */
-    let a = [];
-    if (interfaces) {
-      for (let i = 0; i < interfaces.length; i++) {
-        let iface = interfaces[i];
-        let name = (iface && iface.name) || String(iface);
-        if (name in Ci) {
-          a.push(name);
-        }
-      }
-    }
-    return makeQI(a);
-  };
-}