Bug 1121143 - onFolderRemovedFromQ "canceled" undefined (wrong scope). r=rkent, a=rkent
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 15 Jan 2015 20:47:43 +0200
changeset 25728 01ae61f239cf37f0209dff532c85d413309f5c14
parent 25727 116735199ced6711b7685a6b17b6cf23ab4f9f45
child 25729 3524c4cb9d10af2d961b090c7176008ec3fe61a0
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrkent, rkent
bugs1121143
Bug 1121143 - onFolderRemovedFromQ "canceled" undefined (wrong scope). r=rkent, a=rkent Symptom: autosyncActivities ERROR onFolderRemovedFromQ: ReferenceError: canceled is not defined
mail/components/activity/modules/autosync.js
--- a/mail/components/activity/modules/autosync.js
+++ b/mail/components/activity/modules/autosync.js
@@ -195,19 +195,20 @@ let autosyncModule =
         if (i > -1)
           this._inQFolderList.splice(i, 1);
 
         this.log.info("OnFolderRemovedFromQ [" + this._inQFolderList.length + "] " +
                         folder.prettiestName + " of " + folder.server.prettyName + "\n");
 
         let syncItem = this._syncInfoPerFolder[folder.URI];
         let process = syncItem.activity;
+        let canceled = false;
         if (process instanceof Components.interfaces.nsIActivityProcess)
         {
-          let canceled = (process.state == Components.interfaces.nsIActivityProcess.STATE_CANCELED);
+          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