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:
@@ -18,13 +18,7 @@ function setTimeout(callback, delay) {
|
||||
|
||||
function doUpdate(update) {
|
||||
let listener = {
|
||||
QueryInterface(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.nsIUrlClassifierUpdateObserver))
|
||||
return this;
|
||||
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIUrlClassifierUpdateObserver"]),
|
||||
updateUrlRequested(url) { },
|
||||
streamFinished(status) { },
|
||||
updateError(errorCode) {
|
||||
@@ -74,12 +68,7 @@ function waitForInit() {
|
||||
Services.io.newURI(url), {});
|
||||
|
||||
let listener = {
|
||||
QueryInterface(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.nsIUrlClassifierUpdateObserver))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIUrlClassifierUpdateObserver"]),
|
||||
|
||||
handleEvent(value) {
|
||||
if (value === table) {
|
||||
|
||||
Reference in New Issue
Block a user