Bug 758585 - Fix all creations of nsITimer that are locally-scoped, module: calendar. r=MakeMyDay

This commit is contained in:
Jean-Luc Bonnafoux 2017-02-11 21:48:27 +01:00
Родитель 2d37b15266
Коммит df0cca5be3
2 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -150,6 +150,7 @@ cal.BadCertHandler = function(thisProvider) {
};
cal.BadCertHandler.prototype = {
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIBadCertListener2]),
timer: null,
notifyCertProblem: function(socketInfo, status, targetSite) {
// Unfortunately we can't pass js objects using the window watcher, so
@ -179,11 +180,13 @@ cal.BadCertHandler.prototype = {
}
}
};
let timer = Components.classes["@mozilla.org/timer;1"]
.createInstance(Components.interfaces.nsITimer);
timer.initWithCallback(timerCallback,
0,
Components.interfaces.nsITimer.TYPE_ONE_SHOT);
this.timer = Components.classes["@mozilla.org/timer;1"]
.createInstance(Components.interfaces.nsITimer);
this.timer.initWithCallback(
timerCallback,
0,
Components.interfaces.nsITimer.TYPE_ONE_SHOT
);
return true;
}
};

Просмотреть файл

@ -678,6 +678,7 @@ multigetSyncHandler.prototype = {
unhandledErrors: 0,
itemsNeedFetching: null,
additionalSyncNeeded: false,
timer: null,
QueryInterface: XPCOMUtils.generateQI([
Components.interfaces.nsISAXContentHandler,
@ -809,11 +810,13 @@ multigetSyncHandler.prototype = {
this.requestHandler.doMultiGet();
}
};
let timer = Components.classes["@mozilla.org/timer;1"]
.createInstance(Components.interfaces.nsITimer);
timer.initWithCallback(timerCallback,
0,
Components.interfaces.nsITimer.TYPE_ONE_SHOT);
this.timer = Components.classes["@mozilla.org/timer;1"]
.createInstance(Components.interfaces.nsITimer);
this.timer.initWithCallback(
timerCallback,
0,
Components.interfaces.nsITimer.TYPE_ONE_SHOT
);
}
},