Bug 1119911 - undefined property this.autoSyncManager, r=magnus, a=rkent
authorR Kent James <kent@caspia.com>
Fri, 09 Jan 2015 14:57:03 -0800
changeset 21619 f588ec397390466e50b988cfbbbfd00d65826347
parent 21618 befb9c45eef63078b39215821f990f67c92daa42
child 21620 ace53b7be81628bc233da9fb95ebe5f38cccf8c0
push id1305
push usermbanner@mozilla.com
push dateMon, 23 Feb 2015 19:48:12 +0000
treeherdercomm-beta@3ae4f13858fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmagnus, rkent
bugs1119911
Bug 1119911 - undefined property this.autoSyncManager, r=magnus, a=rkent
mail/components/activity/modules/autosync.js
--- a/mail/components/activity/modules/autosync.js
+++ b/mail/components/activity/modules/autosync.js
@@ -47,16 +47,22 @@ let autosyncModule =
   },
 
   get activityMgr() {
     delete this.activityMgr;
     return this.activityMgr = Cc["@mozilla.org/activity-manager;1"]
                                 .getService(Ci.nsIActivityManager);
   },
 
+  get autoSyncManager() {
+    delete this.autoSyncManager;
+    return this.autoSyncManager = Cc["@mozilla.org/imap/autosyncmgr;1"]
+                                    .getService(Ci.nsIAutoSyncManager);
+  },
+
   get bundle() {
     delete this.bundle;
     return this.bundle = Services.strings
       .createBundle("chrome://messenger/locale/activity.properties");
   },
 
   getString: function(stringName) {
     try {
@@ -191,17 +197,17 @@ let autosyncModule =
 
         this.log.info("OnFolderRemovedFromQ [" + this._inQFolderList.length + "] " +
                         folder.prettiestName + " of " + folder.server.prettyName + "\n");
 
         let syncItem = this._syncInfoPerFolder[folder.URI];
         let process = syncItem.activity;
         if (process instanceof Components.interfaces.nsIActivityProcess)
         {
-          canceled = (process.state == Components.interfaces.nsIActivityProcess.STATE_CANCELED);
+          let canceled = (process.state == Components.interfaces.nsIActivityProcess.STATE_CANCELED);
           process.state = Components.interfaces.nsIActivityProcess.STATE_COMPLETED;
 
           try {
             this.activityMgr.removeActivity(process.id);
           }
           catch(e) {
             // It is OK to end up here; If the folder is queued and the
             // message get manually downloaded by the user, we might get