diff --git a/calendar/base/modules/calProviderUtils.jsm b/calendar/base/modules/calProviderUtils.jsm index cc013fec1a..eebf7036e9 100644 --- a/calendar/base/modules/calProviderUtils.jsm +++ b/calendar/base/modules/calProviderUtils.jsm @@ -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; } }; diff --git a/calendar/providers/caldav/calDavRequestHandlers.js b/calendar/providers/caldav/calDavRequestHandlers.js index 39061b3fd3..cd9aa22c0d 100644 --- a/calendar/providers/caldav/calDavRequestHandlers.js +++ b/calendar/providers/caldav/calDavRequestHandlers.js @@ -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 + ); } },