]> git.donarmstrong.com Git - dactyl.git/blobdiff - common/modules/services.jsm
Import r6976 from upstream hg supporting Firefox up to 25.*
[dactyl.git] / common / modules / services.jsm
index 377cd13edec5345d5e8809a9b35474bcf89c7752..315f95189531ef9bd5098dde994faa6693a8967f 100644 (file)
@@ -111,7 +111,7 @@ var Services = Module("Services", {
         this.addClass("URL",          "@mozilla.org/network/standard-url;1",       ["nsIStandardURL", "nsIURL"], "init");
         this.addClass("Xmlhttp",      "@mozilla.org/xmlextras/xmlhttprequest;1",   [], "open");
         this.addClass("XPathEvaluator", "@mozilla.org/dom/xpath-evaluator;1",      "nsIDOMXPathEvaluator");
-        this.addClass("XMLDocument",  "@mozilla.org/xml/xml-document;1",           ["nsIDOMXMLDocument", "nsIDOMNodeSelector"]);
+        this.addClass("XMLDocument",  "@mozilla.org/xml/xml-document;1",           "nsIDOMXMLDocument");
         this.addClass("XMLSerializer","@mozilla.org/xmlextras/xmlserializer;1",    ["nsIDOMSerializer"]);
         this.addClass("ZipReader",    "@mozilla.org/libjar/zip-reader;1",          "nsIZipReader", "open", false);
         this.addClass("ZipWriter",    "@mozilla.org/zipwriter;1",                  "nsIZipWriter", "open", false);
@@ -126,7 +126,8 @@ var Services = Module("Services", {
             if (!service.interfaces.length)
                 return res.wrappedJSObject || res;
 
-            service.interfaces.forEach(function (iface) res instanceof Ci[iface]);
+            service.interfaces.forEach(iface => { res instanceof Ci[iface]; });
+
             if (service.init && args.length) {
                 if (service.callable)
                     res[service.init].apply(res, args);
@@ -162,7 +163,7 @@ var Services = Module("Services", {
         this.services[name] = { method: meth, class: class_, interfaces: Array.concat(ifaces || []) };
         if (name in this && ifaces && !this.__lookupGetter__(name) && !(this[name] instanceof Ci.nsISupports))
             throw TypeError();
-        memoize(this, name, function () self._create(name));
+        memoize(this, name, () => self._create(name));
     },
 
     /**
@@ -206,7 +207,7 @@ var Services = Module("Services", {
      * @param {string} name The service's cache key.
      */
     has: function has(name) Set.has(this.services, name) && this.services[name].class in Cc &&
-        this.services[name].interfaces.every(function (iface) iface in Ci)
+        this.services[name].interfaces.every(iface => iface in Ci)
 });
 
 endModule();