Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs

Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU
This commit is contained in:
Kris Maglione
2018-05-08 18:36:22 -07:00
parent f45e53c27b
commit c03fa450d6
84 changed files with 328 additions and 564 deletions

View File

@@ -89,12 +89,7 @@ function OpenCacheEntry(key, where, flags, lci) {
CacheListener.prototype = {
_appCache: null,
QueryInterface(iid) {
if (iid.equals(Ci.nsICacheEntryOpenCallback) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
},
QueryInterface: ChromeUtils.generateQI(["nsICacheEntryOpenCallback"]),
onCacheEntryCheck(entry, appCache) {
return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;