Bug 1436310 - Port bug 1432992 to mail: Remove definitions of Ci, Cr, Cc, and Cu. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 07 Feb 2018 12:19:19 +0100
changeset 31062 c32109102bb911d33544ff3bd89352e9849c38db
parent 31061 f40eacb79d82103c057e7be7801464c472b96f9d
child 31063 e1013e31ffaeea1733b1b3e5b728b6f1e84a022d
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk
bugs1436310, 1432992
Bug 1436310 - Port bug 1432992 to mail: Remove definitions of Ci, Cr, Cc, and Cu. r=jorgk
ldap/xpcom/tests/unit/test_nsLDAPURL.js
mail/base/content/contentAreaClick.js
mail/base/content/folderPane.js
mail/base/content/glodaFacetView.js
mail/base/content/macMessengerOverlay.js
mail/base/content/mailCommands.js
mail/base/content/mailWindowOverlay.js
mail/base/content/plugins.js
mail/base/content/sanitizeDialog.js
mail/base/content/specialTabs.js
mail/base/modules/MailUtils.js
mail/base/modules/MsgHdrSyntheticView.js
mail/base/modules/Windows8WindowFrameColor.jsm
mail/base/modules/dbViewWrapper.js
mail/base/modules/distribution.js
mail/base/modules/mailInstrumentation.js
mail/base/modules/mailMigrator.js
mail/base/modules/mailViewManager.js
mail/base/modules/oauth.jsm
mail/base/modules/quickFilterManager.js
mail/base/modules/searchSpec.js
mail/base/modules/sessionStoreManager.js
mail/base/test/unit/head_mailbase.js
mail/components/DownloadsStartup.js
mail/components/about-support/content/aboutSupport.js
mail/components/about-support/content/accounts.js
mail/components/aboutRedirector.js
mail/components/accountcreation/content/util.js
mail/components/activity/modules/alertHook.js
mail/components/activity/modules/autosync.js
mail/components/activity/modules/glodaIndexer.js
mail/components/activity/modules/moveCopy.js
mail/components/activity/modules/pop3Download.js
mail/components/activity/modules/sendLater.js
mail/components/activity/nsActivity.js
mail/components/activity/nsActivityManager.js
mail/components/activity/nsActivityManagerUI.js
mail/components/addrbook/content/abTrees.js
mail/components/appIdleManager.js
mail/components/cloudfile/cloudFileAccounts.js
mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
mail/components/cloudfile/content/addAccountDialog.js
mail/components/cloudfile/nsBox.js
mail/components/cloudfile/nsHightail.js
mail/components/compose/content/MsgComposeCommands.js
mail/components/compose/content/cloudAttachmentLinkManager.js
mail/components/devtools/devtools-loader.js
mail/components/downloads/content/aboutDownloads.js
mail/components/im/content/am-im.js
mail/components/im/content/imAccountWizard.js
mail/components/im/content/imAccounts.js
mail/components/im/content/joinchat.js
mail/components/im/imIncomingServer.js
mail/components/im/imProtocolInfo.js
mail/components/im/modules/chatNotifications.jsm
mail/components/im/modules/index_im.js
mail/components/im/modules/search_im.js
mail/components/mailContentHandler.js
mail/components/mailGlue.js
mail/components/newmailaccount/content/accountProvisioner.js
mail/components/newmailaccount/content/accountProvisionerTab.js
mail/components/newmailaccount/content/uriListener.js
mail/components/preferences/applications.js
mail/components/preferences/chat.js
mail/components/preferences/fonts.js
mail/components/search/content/searchCommon.js
mail/components/shell/nsSetDefaultMail.js
mail/components/test/unit/head_mailcomponents.js
mail/components/wintaskbar/windowsJumpLists.js
mail/test/mozmill/cloudfile/test-cloudfile-backend-hightail.js
mail/test/mozmill/cloudfile/test-cloudfile-manager.js
mail/test/mozmill/composition/test-attachment.js
mail/test/mozmill/composition/test-image-insertion-dialog.js
mail/test/mozmill/migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js
mail/test/mozmill/migration-to-rdf-ui-3/test-migrate-to-rdf-ui-3.js
mail/test/mozmill/newmailaccount/test-newmailaccount.js
mail/test/mozmill/pref-window/test-attachments-pane.js
mail/test/mozmill/shared-modules/test-cloudfile-helpers.js
mail/test/resources/jsbridge/jsbridge/extension/resource/modules/server.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/init.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/utils.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
--- a/ldap/xpcom/tests/unit/test_nsLDAPURL.js
+++ b/ldap/xpcom/tests/unit/test_nsLDAPURL.js
@@ -1,16 +1,13 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /*
  * Test suite for nsLDAPURL functions.
  */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-
 // If we are still using the wallet service, then default port numbers
 // are still visible in the password manager, and therefore we need to have
 // them in the url. The toolkit login manager doesn't do this.
 const usingWallet = "nsIWalletService" in Ci;
 const portAdpt = usingWallet ? ":389" : "";
 
 const ldapURLs =
   [ { url: "ldap://localhost/dc=test",
--- a/mail/base/content/contentAreaClick.js
+++ b/mail/base/content/contentAreaClick.js
@@ -111,17 +111,16 @@ function contentAreaClick(aEvent)
   // Otherwise fall through and open externally.
   if (isLinkToAnchorOnPage(target))
     return true;
 
   let href = hRefForClickEvent(aEvent);
 
   if (!href && !aEvent.button) {
     // Is this an image that we might want to scale?
-    const Ci = Components.interfaces;
 
     if (target instanceof Ci.nsIImageLoadingContent) {
       // Make sure it loaded successfully. No action if not or a broken link.
       var req = target.getRequest(Ci.nsIImageLoadingContent.CURRENT_REQUEST);
       if (!req || req.imageStatus & Ci.imgIRequest.STATUS_ERROR)
         return false;
 
       // Is it an image?
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -129,18 +129,16 @@ var IFolderTreeMode = {
 var gFolderTreeView = {
   messengerBundle: null,
 
   /**
    * Called when the window is initially loaded.  This function initializes the
    * folder-pane to the view last shown before the application was closed.
    */
   load: function ftv_load(aTree, aJSONFile) {
-    const Cc = Components.classes;
-    const Ci = Components.interfaces;
     this._treeElement = aTree;
     this.messengerBundle = document.getElementById("bundle_messenger");
 
     // the folder pane can be used for other trees which may not have these elements.
     if (document.getElementById("folderpane_splitter"))
       document.getElementById("folderpane_splitter").collapsed = false;
     if (document.getElementById("folderPaneBox"))
       document.getElementById("folderPaneBox").collapsed = false;
@@ -678,18 +676,16 @@ var gFolderTreeView = {
   get rowCount() {
     return this._rowMap.length;
   },
 
   /**
    * drag drop interfaces
    */
   canDrop: function ftv_canDrop(aRow, aOrientation) {
-    const Cc = Components.classes;
-    const Ci = Components.interfaces;
     let targetFolder = gFolderTreeView._rowMap[aRow]._folder;
     if (!targetFolder)
       return false;
     let dt = this._currentTransfer;
     let types = Array.from(dt.mozTypesAt(0));
     if (types.includes("text/x-moz-message")) {
       if (aOrientation != Ci.nsITreeView.DROP_ON)
         return false;
@@ -783,18 +779,16 @@ var gFolderTreeView = {
         let extFile = dt.mozGetDataAt("application/x-moz-file", i)
                         .QueryInterface(Ci.nsIFile);
         return extFile.isFile();
       }
     }
     return false;
   },
   drop: function ftv_drop(aRow, aOrientation) {
-    const Cc = Components.classes;
-    const Ci = Components.interfaces;
     let targetFolder = gFolderTreeView._rowMap[aRow]._folder;
 
     let dt = this._currentTransfer;
     let count = dt.mozItemCount;
     let cs = MailServices.copy;
 
     // This is a potential rss feed.  A link image as well as link text url
     // should be handled; try to extract a url from non moz apps as well.
@@ -2030,18 +2024,16 @@ var gFolderTreeView = {
       }
     }
   },
 
   /**
    * This is a helper attribute that simply returns a flat list of all folders
    */
   get _enumerateFolders() {
-    const Cc = Components.classes;
-    const Ci = Components.interfaces;
     let folders = [];
 
     for (let server of fixIterator(MailServices.accounts.allServers, Ci.nsIMsgIncomingServer)) {
       // Skip deferred accounts
       if (server instanceof Ci.nsIPop3IncomingServer &&
           server.deferredToAccount)
         continue;
 
@@ -2429,17 +2421,16 @@ ftvItem.prototype = {
 
   command: function fti_command() {
     if (!Services.prefs.getBoolPref("mailnews.reuse_thread_window2"))
       MsgOpenNewWindowForFolder(this._folder.URI, -1 /* key */);
   },
 
   _children: null,
   get children() {
-    const Ci = Components.interfaces;
     // We're caching our child list to save perf.
     if (!this._children) {
       let iter;
       try {
         iter = fixIterator(this._folder.subFolders, Ci.nsIMsgFolder);
       } catch (ex) {
         Services.console.logStringMessage("Discovering children for " + this._folder.URI +
                                           " failed with " + "exception: " + ex);
@@ -2613,17 +2604,16 @@ var gFolderTreeController = {
 
   /**
    * Deletes a folder from its parent. Also handles unsubscribe from newsgroups
    * if the selected folder/s happen to be nntp.
    *
    * @param aFolder (optional) the folder to delete, if not the selected one
    */
   deleteFolder: function ftc_delete(aFolder) {
-    const Ci = Components.interfaces;
     let folders = aFolder ? [aFolder] : gFolderTreeView.getSelectedFolders();
     let folder = folders[0];
 
     // For newsgroups, "delete" means "unsubscribe".
     if (folder.server.type == "nntp" && !folder.getFlag(nsMsgFolderFlags.Virtual)) {
       MsgUnsubscribe(folders);
       return;
     }
@@ -2684,17 +2674,16 @@ var gFolderTreeController = {
 
   /**
    * Deletes everything (folders and messages) in the selected folder.
    * The folder is only emptied if it has the proper Junk flag.
    *
    * @param aFolder (optional)  the folder to empty
    */
   emptyJunk: function ftc_emptyJunk(aFolder) {
-    const Ci = Components.interfaces;
     let folder = aFolder || gFolderTreeView.getSelectedFolders()[0];
 
     if (!folder || !folder.getFlag(nsMsgFolderFlags.Junk))
       return;
 
     if (!this._checkConfirmationPrompt("emptyJunk", folder))
       return;
 
@@ -2846,17 +2835,16 @@ function ftv_SmartItem(aFolder)
 {
   ftvItem.call(this, aFolder); // call super constructor
   this._level = 0;
 }
 
 ftv_SmartItem.prototype = {
   __proto__: ftvItem.prototype,
   get children() {
-    const Ci = Components.interfaces;
     let smartMode = gFolderTreeView.getFolderTreeMode("smart");
 
     // We're caching our child list to save perf.
     if (!this._children) {
       this._children = [];
       let iter = fixIterator(this._folder.subFolders, Ci.nsIMsgFolder);
       for (let folder of iter) {
         if (!smartMode.isSmartFolder(folder)) {
--- a/mail/base/content/glodaFacetView.js
+++ b/mail/base/content/glodaFacetView.js
@@ -7,21 +7,16 @@
  *  Model View Controller (paradigm), we are the view and the XBL widgets are
  *  the the view and controller.
  *
  * Because much of the work related to faceting is not UI-specific, we try and
  *  push as much of it into mailnews/db/gloda/facet.js.  In some cases we may
  *  get it wrong and it may eventually want to migrate.
  */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 ChromeUtils.import("resource:///modules/StringBundle.js");
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/errUtils.js");
 ChromeUtils.import("resource:///modules/templateUtils.js");
 
 ChromeUtils.import("resource:///modules/gloda/public.js");
--- a/mail/base/content/macMessengerOverlay.js
+++ b/mail/base/content/macMessengerOverlay.js
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 
 // Load and add the menu item to the OS X Dock icon menu.
 addEventListener("load", function() {
   let dockMenuElement = document.getElementById("menu_mac_dockmenu");
-  let Cc = Components.classes;
-  let Ci = Components.interfaces;
   let nativeMenu = Cc["@mozilla.org/widget/standalonenativemenu;1"]
                     .createInstance(Ci.nsIStandaloneNativeMenu);
 
   nativeMenu.init(dockMenuElement);
 
   let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
                      .getService(Ci.nsIMacDockSupport);
   dockSupport.dockMenu = nativeMenu;
--- a/mail/base/content/mailCommands.js
+++ b/mail/base/content/mailCommands.js
@@ -457,17 +457,16 @@ saveAsUrlListener.prototype = {
   },
   OnStopRunningUrl: function(aUrl, aExitCode) {
     messenger.saveAs(this.uri, false, this.identity, null);
   }
 };
 
 function SaveAsTemplate(uri) {
   if (uri) {
-    const Ci = Components.interfaces;
     let hdr = messenger.msgHdrFromURI(uri);
     let identity = getIdentityForHeader(hdr, Ci.nsIMsgCompType.Template);
     let templates = MailUtils.getFolderForURI(identity.stationeryFolder, false);
     if (!templates.parent) {
       templates.setFlag(Ci.nsMsgFolderFlags.Templates);
       let isAsync = templates.server.protocolInfo.foldersCreatedAsync;
       templates.createStorageIfMissing(new saveAsUrlListener(uri, identity));
       if (isAsync)
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -1802,17 +1802,16 @@ BatchMessageMover.prototype = {
       // failed, so we'll continue after reporting the error.
     }
     // Now do the default archive processing
     this.continueBatch();
   },
 
   // continue processing of default archive operations
   continueBatch: function () {
-      const Ci = Components.interfaces;
       let batch = this._currentBatch;
       let srcFolder = batch.srcFolder;
       let archiveFolderURI = batch.archiveFolderURI;
       let archiveFolder = MailUtils.getFolderForURI(archiveFolderURI, false);
       let dstFolder = archiveFolder;
 
       let moveArray = Components.classes["@mozilla.org/array;1"]
                                 .createInstance(Ci.nsIMutableArray);
--- a/mail/base/content/plugins.js
+++ b/mail/base/content/plugins.js
@@ -187,18 +187,16 @@ var gPluginHandler = {
                                   (self[callbackName]).apply(self, callbackArgs);
                                 }
                               },
                               true);
   },
 
   // Helper to get the binding handler type from a plugin object
   _getBindingType : function(plugin) {
-    let Ci = Components.interfaces;
-
     if (!(plugin instanceof Ci.nsIObjectLoadingContent))
       return null;
 
     switch (plugin.pluginFallbackType) {
       case Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED:
         return "PluginNotFound";
       case Ci.nsIObjectLoadingContent.PLUGIN_DISABLED:
         return "PluginDisabled";
@@ -327,18 +325,16 @@ var gPluginHandler = {
     // Now open up a content tab to display it in
     let tabmail = document.getElementById('tabmail');
     tabmail.openTab("contentTab", {contentPage: url,
                                    background: false});
   },
 
   // Event listener for blocklisted/outdated/carbonFailure plugins.
   pluginUnavailable: function(plugin, eventType) {
-    let Cc = Components.classes;
-    let Ci = Components.interfaces;
     var tabmail = document.getElementById('tabmail');
     let browser = tabmail.getBrowserForDocument(plugin.ownerDocument
                                                 .defaultView).browser;
 
     var notificationBox = getNotificationBox(browser.contentWindow);
 
     // Should only display one of these warnings per page.
     // In order of priority, they are: outdated > blocklisted
--- a/mail/base/content/sanitizeDialog.js
+++ b/mail/base/content/sanitizeDialog.js
@@ -1,16 +1,13 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 var gSanitizePromptDialog = {
 
   get bundleBrowser()
   {
     if (!this._bundleBrowser)
       this._bundleBrowser = document.getElementById("bundleBrowser");
     return this._bundleBrowser;
   },
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -1324,17 +1324,16 @@ var specialTabs = {
     Services.obs.removeObserver(specialTabs.xpInstallObserver,
                                 "addon-install-failed");
     Services.obs.removeObserver(specialTabs.xpInstallObserver,
                                 "addon-install-complete");
   },
 
   xpInstallObserver: {
     observe: function (aSubject, aTopic, aData) {
-      const Ci = Components.interfaces;
       let brandBundle = document.getElementById("bundle_brand");
       let messengerBundle = document.getElementById("bundle_messenger");
 
       let installInfo = aSubject.wrappedJSObject;
       let browser = installInfo.browser;
       let notificationBox = getNotificationBox(browser.contentWindow);
       let notificationID = aTopic;
       let brandShortName = brandBundle.getString("brandShortName");
--- a/mail/base/modules/MailUtils.js
+++ b/mail/base/modules/MailUtils.js
@@ -1,17 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["MailUtils"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/MailConsts.js");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 var MC = MailConsts;
 
--- a/mail/base/modules/MsgHdrSyntheticView.js
+++ b/mail/base/modules/MsgHdrSyntheticView.js
@@ -4,20 +4,16 @@
 
 /*
  * This object provides you a way to have a synthetic nsIMsgDBView for a single
  * message header.
  */
 
 var EXPORTED_SYMBOLS = ["MsgHdrSyntheticView"];
 
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 /**
  * Create a synthetic view suitable for passing to |FolderDisplayWidget.show|.
  * You must pass a single message header in.
  *
  * @param aMsgHdr The message header to create the synthetic view for.
  */
 function MsgHdrSyntheticView(aMsgHdr) {
   this.msgHdr = aMsgHdr;
--- a/mail/base/modules/Windows8WindowFrameColor.jsm
+++ b/mail/base/modules/Windows8WindowFrameColor.jsm
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
-const {interfaces: Ci, utils: Cu} = Components;
 
 this.EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 var Registry = ChromeUtils.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry;
 
 var Windows8WindowFrameColor = {
--- a/mail/base/modules/dbViewWrapper.js
+++ b/mail/base/modules/dbViewWrapper.js
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['DBViewWrapper', 'IDBViewWrapperListener'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/mailViewManager.js");
 ChromeUtils.import("resource:///modules/searchSpec.js");
 ChromeUtils.import("resource:///modules/virtualFolderWrapper.js");
 
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
 var nsMsgViewType = Ci.nsMsgViewType;
 var nsMsgViewFlagsType = Ci.nsMsgViewFlagsType;
--- a/mail/base/modules/distribution.js
+++ b/mail/base/modules/distribution.js
@@ -1,18 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["TBDistCustomizer"];
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
   "distribution-customization-complete";
 
 var TBDistCustomizer = {
   applyPrefDefaults: function TBDistCustomizer_applyPrefDefaults() {
--- a/mail/base/modules/mailInstrumentation.js
+++ b/mail/base/modules/mailInstrumentation.js
@@ -5,20 +5,16 @@
 /**
  * Thunderbird UI Instrumentation, currently just the account setup process.
  */
 
 /* :::::::: Constants and Helpers ::::::::::::::: */
 
 this.EXPORTED_SYMBOLS = ["mailInstrumentationManager"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 var nsIMFNService = Ci.nsIMsgFolderNotificationService;
 
 ChromeUtils.import("resource:///modules/errUtils.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
--- a/mail/base/modules/mailMigrator.js
+++ b/mail/base/modules/mailMigrator.js
@@ -6,20 +6,16 @@
 /**
  * This module handles migrating mail-specific preferences, etc. Migration has
  * traditionally been a part of msgMail3PaneWindow.js, but separating the code
  * out into a module makes unit testing much easier.
  */
 
 var EXPORTED_SYMBOLS = ["MailMigrator"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/IOUtils.js");
 
 ChromeUtils.defineModuleGetter(this, "LoginHelper",
                                "resource://gre/modules/LoginHelper.jsm");
 
 var MailMigrator = {
--- a/mail/base/modules/mailViewManager.js
+++ b/mail/base/modules/mailViewManager.js
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['MailViewManager', 'MailViewConstants'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 var nsMsgSearchScope  = Ci.nsMsgSearchScope;
 var nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
 var nsMsgSearchOp     = Ci.nsMsgSearchOp;
 
 var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
 
 /**
  * Put the MailViewConstants in an object so we can export them to
--- a/mail/base/modules/oauth.jsm
+++ b/mail/base/modules/oauth.jsm
@@ -3,18 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * This js module does OAuth 1.0 authentication. It was originally intended to
  * be shareable by various components that need Oauth, but some changes will
  * need to be made to support differences in OAuth usage.
  */
 
-var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
-
 var EXPORTED_SYMBOLS = ["OAuth"];
 
 ChromeUtils.import("resource://gre/modules/Http.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 function OAuth(aDisplayName, aBaseUri, aAuthUri, aAuthToken, aAuthTokenSecret,
--- a/mail/base/modules/quickFilterManager.js
+++ b/mail/base/modules/quickFilterManager.js
@@ -1,18 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["QuickFilterState", "QuickFilterManager",
                           "MessageTextFilter", "QuickFilterSearchListener"];
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
 
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/errUtils.js");
 ChromeUtils.import("resource:///modules/mailServices.js");
--- a/mail/base/modules/searchSpec.js
+++ b/mail/base/modules/searchSpec.js
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['SearchSpec'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var nsMsgSearchScope = Ci.nsMsgSearchScope;
 var nsIMsgSearchTerm = Ci.nsIMsgSearchTerm;
 var nsIMsgLocalMailFolder = Ci.nsIMsgLocalMailFolder;
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
--- a/mail/base/modules/sessionStoreManager.js
+++ b/mail/base/modules/sessionStoreManager.js
@@ -5,20 +5,16 @@
 /**
  * Session Storage and Restoration
  */
 
 /* :::::::: Constants and Helpers ::::::::::::::: */
 
 this.EXPORTED_SYMBOLS = ["sessionStoreManager"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/JSONFile.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * asuth arbitrarily chose this value to trade-off powersaving,
  * processor usage, and recency of state in the face of the impossibility of
  * our crashing; he also worded this.
  */
--- a/mail/base/test/unit/head_mailbase.js
+++ b/mail/base/test/unit/head_mailbase.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://testing-common/mailnews/mailTestUtils.js");
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
 var CC = Components.Constructor;
 
 // Ensure the profile directory is set up
 do_get_profile();
 
 var gDEPTH = "../../../../";
 
 registerCleanupFunction(function() {
--- a/mail/components/DownloadsStartup.js
+++ b/mail/components/DownloadsStartup.js
@@ -10,19 +10,16 @@
  * anymore (bug 851471).
  */
 
 "use strict";
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Globals
 
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "DownloadIntegration",
                                "resource://gre/modules/DownloadIntegration.jsm");
 
 /**
  * CID and Contract ID of the JavaScript implementation of nsITransfer.
  */
 var kTransferCid = Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}");
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -2,18 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This file is a copy of mozilla/toolkit/content/aboutSupport.js with
    modifications for TB. */
 
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Troubleshoot.jsm");
 ChromeUtils.import("resource://gre/modules/ResetProfile.jsm");
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 // added for TB
 ChromeUtils.import("resource:///modules/mailServices.js");
 // end of TB addition
 
--- a/mail/components/about-support/content/accounts.js
+++ b/mail/components/about-support/content/accounts.js
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-var { interfaces: Ci, utils: Cu } = Components;
-
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Platform-specific includes
 if ("@mozilla.org/windows-registry-key;1" in Cc)
   ChromeUtils.import("resource:///modules/aboutSupportWin32.js");
 else if ("nsILocalFileMac" in Ci)
--- a/mail/components/aboutRedirector.js
+++ b/mail/components/aboutRedirector.js
@@ -1,14 +1,11 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function AboutRedirector() {}
 AboutRedirector.prototype = {
   classDescription: "Mail about: Redirector",
   classID: Components.ID("{8cc51368-6aa0-43e8-b762-bde9b9fd828c}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
--- a/mail/components/accountcreation/content/util.js
+++ b/mail/components/accountcreation/content/util.js
@@ -1,24 +1,16 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 /**
  * Some common, generic functions
  */
 
-try {
-  var Cc = Components.classes;
-  var Ci = Components.interfaces;
-} catch (e) { ddump(e); } // if already declared, as in xpcshell-tests
-try {
-  var Cu = Components.utils;
-} catch (e) { ddump(e); }
-
 ChromeUtils.import("resource:///modules/errUtils.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function assert(test, errorMsg)
 {
   if (!test)
     throw new NotReached(errorMsg ? errorMsg :
           "Programming bug. Assertion failed, see log.");
--- a/mail/components/activity/modules/alertHook.js
+++ b/mail/components/activity/modules/alertHook.js
@@ -1,19 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['alertHook'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // This module provides a link between the send later service and the activity
--- a/mail/components/activity/modules/autosync.js
+++ b/mail/components/activity/modules/autosync.js
@@ -1,19 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['autosyncModule'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/glodaIndexer.js
+++ b/mail/components/activity/modules/glodaIndexer.js
@@ -1,20 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["glodaIndexerActivity"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent   = Components.Constructor("@mozilla.org/activity-event;1",
                                             "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/moveCopy.js
+++ b/mail/components/activity/modules/moveCopy.js
@@ -1,19 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['moveCopyModule'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
 
--- a/mail/components/activity/modules/pop3Download.js
+++ b/mail/components/activity/modules/pop3Download.js
@@ -1,19 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['pop3DownloadModule'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/sendLater.js
+++ b/mail/components/activity/modules/sendLater.js
@@ -1,19 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['sendLaterModule'];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/nsActivity.js
+++ b/mail/components/activity/nsActivity.js
@@ -3,20 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 ////////////////////////////////////////////////////////////////////////////////
 //// Base class for nsActivityProcess and nsActivityEvent objects
 
 function nsActivity()
 {
   this._initLogging();
   this._listeners = [];
   this._subjects = [];
--- a/mail/components/activity/nsActivityManager.js
+++ b/mail/components/activity/nsActivityManager.js
@@ -4,21 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-
 ////////////////////////////////////////////////////////////////////////////////
 //// nsActivityManager class
 
 function nsActivityManager()
 {}
 
 nsActivityManager.prototype = {
   classID: Components.ID("8aa5972e-19cb-41cc-9696-645f8a8d1a06"),
--- a/mail/components/activity/nsActivityManagerUI.js
+++ b/mail/components/activity/nsActivityManagerUI.js
@@ -3,20 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 var ACTIVITY_MANAGER_URL = "chrome://messenger/content/activity.xul";
 var PREF_FLASH_COUNT = "messenger.activity.manager.flashCount";
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsActivityManagerUI class
 
 function nsActivityManagerUI()
 {}
--- a/mail/components/addrbook/content/abTrees.js
+++ b/mail/components/addrbook/content/abTrees.js
@@ -10,18 +10,16 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/IOUtils.js");
 
 // Tree Sort helper methods.
 var AB_ORDER = ["aab", "pab", "mork", "ldap", "mapi+other", "anyab", "cab"];
 
 function getDirectoryValue(aDir, aKey) {
-  const Ci = Components.interfaces;
-
   if (aKey == "ab_type") {
     if (aDir._directory.URI == kAllDirectoryRoot + "?")
       return "aab";
     if (aDir._directory.URI == kPersonalAddressbookURI)
       return "pab";
     if (aDir._directory.URI == kCollectedAddressbookURI)
       return "cab";
     if (aDir._directory instanceof Ci.nsIAbMDBDirectory)
@@ -95,17 +93,16 @@ abDirTreeItem.prototype = {
 
   _level: 0,
   get level() {
     return this._level;
   },
 
   _children: null,
   get children() {
-    const Ci = Components.interfaces;
     if (!this._children) {
       this._children = [];
       let myEnum;
       if (this._directory.URI == (kAllDirectoryRoot + "?"))
         myEnum = MailServices.ab.directories;
       else
         myEnum = this._directory.childNodes;
 
--- a/mail/components/appIdleManager.js
+++ b/mail/components/appIdleManager.js
@@ -2,19 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ['appIdleManager'];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 // This module provides a mechanism to turn window focus and blur events
 // into app idle notifications. If we get a blur notification that is not
 // followed by a focus notification in less than some small number of seconds,
 // then we send a begin app idle notification.
 // If we get a focus event, and we're app idle, then we send an end app idle
 // notification.
 // The notification topic is "mail:appIdle", the values are "idle", and "back"
 
--- a/mail/components/cloudfile/cloudFileAccounts.js
+++ b/mail/components/cloudfile/cloudFileAccounts.js
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["cloudFileAccounts"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
 var CATEGORY = "cloud-files";
 var PREF_ROOT = "mail.cloud_files.";
 var ACCOUNT_ROOT = PREF_ROOT + "accounts.";
 
 // The following constants are used to query and insert entries
 // into the nsILoginManager.
 var PWDMGR_HOST = "chrome://messenger/cloudfile";
 var PWDMGR_REALM = "BigFiles Auth Token";
--- a/mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
+++ b/mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
@@ -1,17 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 document.addEventListener("DOMContentLoaded", function() {
   if ("wrappedJSObject" in window.arguments[0]) {
     let storage = parseInt(window.arguments[0].wrappedJSObject.storage);
     storage = (storage / 1024 / 1024 / 1024).toFixed(2);
     let currentStorage = document.getElementById('currentStorage');
--- a/mail/components/cloudfile/content/addAccountDialog.js
+++ b/mail/components/cloudfile/content/addAccountDialog.js
@@ -1,19 +1,14 @@
 /* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
 var kFormId = "provider-form";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 
 function createAccountObserver() {};
 
--- a/mail/components/cloudfile/nsBox.js
+++ b/mail/components/cloudfile/nsBox.js
@@ -3,18 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This file implements the nsIMsgCloudFileProvider interface.
  *
  * This component handles the Box implementation of the
  * nsIMsgCloudFileProvider interface.
  */
 
-var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 ChromeUtils.import("resource:///modules/OAuth2.jsm");
 ChromeUtils.import("resource://gre/modules/Http.jsm");
 
 Cu.importGlobalProperties(["File", "XMLHttpRequest"]);
--- a/mail/components/cloudfile/nsHightail.js
+++ b/mail/components/cloudfile/nsHightail.js
@@ -3,18 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This file implements the nsIMsgCloudFileProvider interface.
  *
  * This component handles the Hightail implementation of the
  * nsIMsgCloudFileProvider interface.
  */
 
-var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
 var gServerUrl = "https://dpi.yousendit.com"; // Production url
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -6622,17 +6622,16 @@ function enableInlineSpellCheck(aEnableI
 }
 
 function getMailToolbox()
 {
   return document.getElementById("compose-toolbox");
 }
 
 function getPref(aPrefName, aIsComplex) {
-  const Ci = Components.interfaces;
   if (aIsComplex) {
     return Services.prefs.getStringPref(aPrefName);
   }
   switch (Services.prefs.getPrefType(aPrefName)) {
     case Ci.nsIPrefBranch.PREF_BOOL:
       return Services.prefs.getBoolPref(aPrefName);
     case Ci.nsIPrefBranch.PREF_INT:
       return Services.prefs.getIntPref(aPrefName);
--- a/mail/components/compose/content/cloudAttachmentLinkManager.js
+++ b/mail/components/compose/content/cloudAttachmentLinkManager.js
@@ -451,18 +451,16 @@ var gCloudAttachmentLinkManager = {
 
   /**
    * Event handler for when mail is sent.  For mail that is being sent
    * (and not saved!), find any cloudAttachmentList* nodes that we've created,
    * and strip their IDs out.  That way, if the receiving user replies by
    * sending some BigFiles, we don't run into ID conflicts.
    */
   send: function(aEvent) {
-    const Ci = Components.interfaces;
-
     let msgType = parseInt(aEvent.target.getAttribute("msgtype"));
 
     if (msgType == Ci.nsIMsgCompDeliverMode.Now ||
         msgType == Ci.nsIMsgCompDeliverMode.Later ||
         msgType == Ci.nsIMsgCompDeliverMode.Background) {
 
       const kIDs = ["cloudAttachmentList", "cloudAttachmentListRoot",
                     "cloudAttachmentListHeader"];
--- a/mail/components/devtools/devtools-loader.js
+++ b/mail/components/devtools/devtools-loader.js
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const { interfaces: Ci, utils: Cu } = Components;
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 
 function DevToolsStartup() {}
 
 DevToolsStartup.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
   classID: Components.ID("{089694e9-106a-4704-abf7-62a88545e194}"),
--- a/mail/components/downloads/content/aboutDownloads.js
+++ b/mail/components/downloads/content/aboutDownloads.js
@@ -1,20 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 ChromeUtils.defineModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm");
 ChromeUtils.defineModuleGetter(this, "DownloadUtils", "resource://gre/modules/DownloadUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 var DownloadsView = {
   init() {
     window.controllers.insertControllerAt(0, this);
     this.listElement = document.getElementById("msgDownloadsRichListBox");
--- a/mail/components/im/content/am-im.js
+++ b/mail/components/im/content/am-im.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var autoJoinPref = "autoJoin";
 
 function onPreInit(aAccount, aAccountValue)
 {
   account.init(aAccount.incomingServer.wrappedJSObject.imAccount);
 }
--- a/mail/components/im/content/imAccountWizard.js
+++ b/mail/components/im/content/imAccountWizard.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 
 var PREF_EXTENSIONS_GETMOREPROTOCOLSURL = "extensions.getMoreProtocolsURL";
 
 var accountWizard = {
   onload: function aw_onload() {
     // Ensure the im core is initialized before we get a list of protocols.
--- a/mail/components/im/content/imAccounts.js
+++ b/mail/components/im/content/imAccounts.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
 
 // This is the list of notifications that the account manager window observes
 var events = [
   "prpl-quit",
--- a/mail/components/im/content/joinchat.js
+++ b/mail/components/im/content/joinchat.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/imServices.jsm");
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
 var autoJoinPref = "autoJoin";
 
 var joinChat = {
   onload: function jc_onload() {
     var accountList = document.getElementById("accountlist");
     for (let acc of fixIterator(Services.accounts.getAccounts())) {
       if (!acc.connected || !acc.canJoinChat)
         continue;
--- a/mail/components/im/imIncomingServer.js
+++ b/mail/components/im/imIncomingServer.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/imServices.jsm");
 
 function imIncomingServer() { }
 
 imIncomingServer.prototype = {
   get wrappedJSObject() { return this; },
   _imAccount: null,
--- a/mail/components/im/imProtocolInfo.js
+++ b/mail/components/im/imProtocolInfo.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function imProtocolInfo() { }
 
 imProtocolInfo.prototype = {
 
   defaultLocalPath: null,
   get serverIID() { return null; },
--- a/mail/components/im/modules/chatNotifications.jsm
+++ b/mail/components/im/modules/chatNotifications.jsm
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["Notifications"];
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/hiddenWindow.jsm");
 ChromeUtils.import("resource:///modules/StringBundle.js");
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
--- a/mail/components/im/modules/index_im.js
+++ b/mail/components/im/modules/index_im.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = [];
 
-var {classes: Cc, interfaces: Ci, utils: Cu, Constructor: CC} = Components;
+var CC = Components.Constructor;
 
 ChromeUtils.import("resource:///modules/gloda/public.js");
 ChromeUtils.import("resource:///modules/gloda/datamodel.js");
 ChromeUtils.import("resource:///modules/gloda/indexer.js");
 ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
--- a/mail/components/im/modules/search_im.js
+++ b/mail/components/im/modules/search_im.js
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["GlodaIMSearcher"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/gloda/public.js");
 
 /**
  * How much time boost should a 'score point' amount to?  The authoritative,
  *  incontrivertible answer, across all time and space, is a week.
  *  Note that gloda stores conversation timestamps in seconds.
  */
--- a/mail/components/mailContentHandler.js
+++ b/mail/components/mailContentHandler.js
@@ -1,18 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-
 // defined in nsIContentHandler.idl.
 var NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
 
 function mailContentHandler() {
 }
 mailContentHandler.prototype = {
   classID: Components.ID("{1c73f03a-b817-4640-b984-18c3478a9ae3}"),
 
--- a/mail/components/mailGlue.js
+++ b/mail/components/mailGlue.js
@@ -1,17 +1,13 @@
 /* -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
 ChromeUtils.import("resource:///modules/distribution.js");
 ChromeUtils.import("resource:///modules/mailMigrator.js");
 ChromeUtils.import("resource:///modules/extensionSupport.jsm");
 
 /**
--- a/mail/components/newmailaccount/content/accountProvisioner.js
+++ b/mail/components/newmailaccount/content/accountProvisioner.js
@@ -1,16 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 ChromeUtils.import("resource:///modules/StringBundle.js");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
--- a/mail/components/newmailaccount/content/accountProvisionerTab.js
+++ b/mail/components/newmailaccount/content/accountProvisionerTab.js
@@ -1,16 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 /**
  * A content tab for the account provisioner.  We use Javascript-y magic to
  * "subclass" specialTabs.contentTabType, and then override the appropriate
  * members.
  *
--- a/mail/components/newmailaccount/content/uriListener.js
+++ b/mail/components/newmailaccount/content/uriListener.js
@@ -3,21 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * This object takes care of intercepting page loads and creating the
  * corresponding account if the page load turns out to be a text/xml file from
  * one of our account providers.
  */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 ChromeUtils.import("resource:///modules/JXON.js");
 
 /**
  * This is an observer that watches all HTTP requests for one where the
  * response contentType contains text/xml.  Once that observation is
--- a/mail/components/preferences/applications.js
+++ b/mail/components/preferences/applications.js
@@ -602,17 +602,16 @@ var gCloudFileTab = {
       let rli = this.makeRichListItemForAccount(account);
       this._list.appendChild(rli);
       if (!(account.accountKey in this._accountCache))
         this.requestUserInfoForItem(rli, false);
     }
   },
 
   requestUserInfoForItem: function CFT_requestUserInfoForItem(aItem, aWithUI) {
-    let Cr = Components.results;
     let accountKey = aItem.value;
     let account = cloudFileAccounts.getAccount(accountKey);
 
     let observer = {
       onStopRequest: function(aRequest, aContext, aStatusCode) {
         gCloudFileTab._accountCache[accountKey].result = aStatusCode;
         gCloudFileTab.onUserInfoRequestDone(accountKey);
       },
@@ -645,18 +644,16 @@ var gCloudFileTab = {
       return;
 
     let item = accountInfo.listItem;
     let result = accountInfo.result;
     this._mapResultToState(item, result);
   },
 
   _mapResultToState: function CFT__mapResultToState(aItem, aResult) {
-    let Cr = Components.results;
-    let Ci = Components.interfaces;
     let itemState = "no-connection";
 
     if (aResult == Cr.NS_OK)
       itemState = "connected";
     else if (aResult == Ci.nsIMsgCloudFileProvider.authErr)
       itemState = "auth-error";
     else if (aResult == Cr.NS_ERROR_NOT_AVAILABLE)
       itemState = "no-connection";
@@ -674,18 +671,16 @@ var gCloudFileTab = {
 
     // The selection tells us the key.  We need the actual
     // provider here.
     let accountKey = selection.value;
     this._showAccountInfo(accountKey);
   },
 
   _showAccountInfo: function CFT__showAccountInfo(aAccountKey) {
-    let Ci = Components.interfaces;
-    let Cr = Components.results;
     let account = this._accountCache[aAccountKey].account;
     let result = this._accountCache[aAccountKey].result;
 
     if (result == Cr.NS_ERROR_NOT_AVAILABLE)
       this._settingsDeck.selectedPanel = this._loadingPanel;
     else if (result == Cr.NS_OK) {
       this._settingsDeck.selectedPanel = this._settingsPanelWrap;
       this._showAccountManagement(account);
--- a/mail/components/preferences/chat.js
+++ b/mail/components/preferences/chat.js
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
 var gChatPane = {
   init: function ()
   {
     previewObserver.load();
     this.updateDisabledState();
   },
 
   updateDisabledState: function ()
--- a/mail/components/preferences/fonts.js
+++ b/mail/components/preferences/fonts.js
@@ -141,18 +141,16 @@ var gFontsDialog = {
 
   /**
    * Both mailnews.send_default_charset and mailnews.view_default_charset
    * are nsIPrefLocalizedString. Its default value is different depending
    * on the user locale (see bug 48842).
    */
   ondialogaccept: function()
   {
-    var Ci = Components.interfaces;
-
     var sendCharsetStr = Services.prefs.getComplexValue(
       "mailnews.send_default_charset", Ci.nsIPrefLocalizedString).data;
 
     var viewCharsetStr = Services.prefs.getComplexValue(
       "mailnews.view_default_charset", Ci.nsIPrefLocalizedString).data;
 
     var defaultPrefs = Services.prefs.getDefaultBranch("mailnews.");
 
--- a/mail/components/search/content/searchCommon.js
+++ b/mail/components/search/content/searchCommon.js
@@ -11,20 +11,16 @@
  * - gHdrIndexedProperty: the property in the database that indicates whether a message
  *   has been indexed
  * - gFileExt: the file extension to be used for support files
  * - gPrefBase: the base for preferences that are stored
  * - gStreamListener: an nsIStreamListener to read message text
  */
 #endif
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource:///modules/MailUtils.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var PERM_DIRECTORY = parseInt("0755", 8);
 var PERM_FILE = parseInt("0644", 8);
--- a/mail/components/shell/nsSetDefaultMail.js
+++ b/mail/components/shell/nsSetDefaultMail.js
@@ -5,19 +5,16 @@
 
 /* This file implements the nsICommandLineHandler interface.
  *
  * This component handles the startup command line argument of the form:
  *   -setDefaultMail
  * by making the current executable the "default mail app."
  */
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function nsSetDefaultMail() {
 }
 
 nsSetDefaultMail.prototype = {
   /* nsISupports */
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
--- a/mail/components/test/unit/head_mailcomponents.js
+++ b/mail/components/test/unit/head_mailcomponents.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://testing-common/mailnews/mailTestUtils.js");
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
 var CC = Components.Constructor;
 
 // Ensure the profile directory is set up
 do_get_profile();
 
 var gDEPTH = "../../../../";
 
 registerCleanupFunction(function() {
--- a/mail/components/wintaskbar/windowsJumpLists.js
+++ b/mail/components/wintaskbar/windowsJumpLists.js
@@ -1,19 +1,15 @@
 /* -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["WinTaskbarJumpList"];
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
 // Prefs
 var PREF_TASKBAR_BRANCH    = "mail.taskbar.lists.";
 var PREF_TASKBAR_ENABLED   = "enabled";
 var PREF_TASKBAR_TASKS     = "tasks.enabled";
--- a/mail/test/mozmill/cloudfile/test-cloudfile-backend-hightail.js
+++ b/mail/test/mozmill/cloudfile/test-cloudfile-backend-hightail.js
@@ -1,20 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
   * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests the Hightail Bigfile backend.
  */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 var MODULE_NAME = 'test-cloudfile-backend-hightail';
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers',
                          'compose-helpers',
                          'cloudfile-helpers',
                          'cloudfile-backend-helpers',
                          'cloudfile-hightail-helpers',
--- a/mail/test/mozmill/cloudfile/test-cloudfile-manager.js
+++ b/mail/test/mozmill/cloudfile/test-cloudfile-manager.js
@@ -2,20 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests the richlistbox in the manager for attachment storage
  * services
  */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 var MODULE_NAME = 'test-cloudfile-manager';
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers',
                        'pref-window-helpers',
                        'window-helpers',
                        'cloudfile-helpers'];
 
--- a/mail/test/mozmill/composition/test-attachment.js
+++ b/mail/test/mozmill/composition/test-attachment.js
@@ -1,20 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests attachment handling functionality of the message compose window.
  */
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
 var elib = {};
 ChromeUtils.import('resource://mozmill/modules/elementslib.js', elib);
 
 var MODULE_NAME = 'test-attachment';
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers', 'compose-helpers',
                        'window-helpers'];
--- a/mail/test/mozmill/composition/test-image-insertion-dialog.js
+++ b/mail/test/mozmill/composition/test-image-insertion-dialog.js
@@ -1,20 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests the image insertion dialog functionality.
  */
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
 var elib = {};
 ChromeUtils.import('resource://mozmill/modules/elementslib.js', elib);
 
 var MODULE_NAME = "test-image-insertion-dialog";
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers', 'compose-helpers',
                        'window-helpers', 'keyboard-helpers'];
--- a/mail/test/mozmill/migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js
+++ b/mail/test/mozmill/migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js
@@ -8,20 +8,16 @@
  */
 
 // make SOLO_TEST=migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js mozmill-one
 
 var MODULE_NAME = "test-migrate-to-rdf-ui-2";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["folder-display-helpers"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function setupModule(module) {
   collector.getModule("folder-display-helpers").installInto(module);
 }
 
 /**
  * Test that the "collapsed" property for the folderPaneBox resource was
--- a/mail/test/mozmill/migration-to-rdf-ui-3/test-migrate-to-rdf-ui-3.js
+++ b/mail/test/mozmill/migration-to-rdf-ui-3/test-migrate-to-rdf-ui-3.js
@@ -6,20 +6,16 @@
  * When moving from ui-rdf 0 to 1, we ensure that we've removed the collapsed
  * property from the folderPaneBox, but that we still persist width.
  */
 
 var MODULE_NAME = "test-migrate-to-rdf-ui-3";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["folder-display-helpers"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function setupModule(module) {
   collector.getModule("folder-display-helpers").installInto(module);
 }
 
 /**
  * Test that the QFB toggle was moved from the tabbar-toolbar to the
--- a/mail/test/mozmill/newmailaccount/test-newmailaccount.js
+++ b/mail/test/mozmill/newmailaccount/test-newmailaccount.js
@@ -1,20 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests the get an account (account provisioning) workflow.
  */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 var MODULE_NAME = 'test-newmailaccount';
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers',
                        'content-tab-helpers',
                        'window-helpers',
                        'newmailaccount-helpers',
                        'keyboard-helpers',
--- a/mail/test/mozmill/pref-window/test-attachments-pane.js
+++ b/mail/test/mozmill/pref-window/test-attachments-pane.js
@@ -1,20 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests the manager for attachment storage services
  */
 
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
 var MODULE_NAME = 'test-attachments-pane';
 
 var RELATIVE_ROOT = '../shared-modules';
 var MODULE_REQUIRES = ['folder-display-helpers',
                        'pref-window-helpers',
                        'window-helpers'];
 
 function setupModule(module) {
--- a/mail/test/mozmill/shared-modules/test-cloudfile-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-cloudfile-helpers.js
@@ -7,18 +7,16 @@ var MODULE_NAME = "cloudfile-helpers";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["folder-display-helpers", "mock-object-helpers"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 var os = {};
 ChromeUtils.import('resource://mozmill/stdlib/os.js', os);
 
-var Cr = Components.results;
-
 var kMockContractIDPrefix = "@mozilla.org/mail/mockCloudFile;1?id=";
 
 var kDefaults = {
   iconClass: "chrome://messenger/skin/icons/box-logo.png",
   accountKey: null,
   settingsURL: "",
   managementURL: "",
   authErr: Ci.nsIMsgCloudFileProvider.authErr,
--- a/mail/test/resources/jsbridge/jsbridge/extension/resource/modules/server.js
+++ b/mail/test/resources/jsbridge/jsbridge/extension/resource/modules/server.js
@@ -36,18 +36,16 @@
 //
 // ***** END LICENSE BLOCK *****
 
 var EXPORTED_SYMBOLS = ["Server", "server", "AsyncRead", "Session", "sessions", "globalRegistry", "startServer"];
 
 var events = {}; ChromeUtils.import("resource://jsbridge/modules/events.js", events);
 var DEBUG_ON = false;
 var BUFFER_SIZE = 1024;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
 var loader = Cc['@mozilla.org/moz/jssubscript-loader;1']
     .getService(Ci.mozIJSSubScriptLoader);
 
 var hwindow = Components.classes["@mozilla.org/appshell/appShellService;1"]
     .getService(Components.interfaces.nsIAppShellService)
     .hiddenDOMWindow;
 
 var json2 = ChromeUtils.import("resource://jsbridge/modules/json2.js");
--- a/mail/test/resources/mozmill/mozmill/extension/resource/modules/init.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/modules/init.js
@@ -34,20 +34,16 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 var EXPORTED_SYMBOLS = ["mozmill"];
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
 var controller = ChromeUtils.import('resource://mozmill/modules/controller.js');
 var mozmill = ChromeUtils.import('resource://mozmill/modules/mozmill.js');
 var utils = ChromeUtils.import('resource://mozmill/modules/utils.js');
 
 
 // Observer when a new top-level window is ready
 var windowReadyObserver = {
   observe: function (subject, topic, data) {
--- a/mail/test/resources/mozmill/mozmill/extension/resource/modules/utils.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/modules/utils.js
@@ -38,19 +38,16 @@
 // ***** END LICENSE BLOCK *****
 
 var EXPORTED_SYMBOLS = ["openFile", "saveFile", "saveAsFile", "genBoiler",
                         "getFile", "Copy", "getChromeWindow", "getWindows", "runEditor",
                         "runFile", "getWindowByTitle", "getWindowByType", "getWindowId",
                         "tempfile", "getMethodInWindows", "getPreference", "setPreference",
                         "sleep", "assert", "unwrapNode", "TimeoutError", "waitFor", "waitForEval"];
 
-var Ci = Components.interfaces;
-
-
 var hwindow = Components.classes["@mozilla.org/appshell/appShellService;1"]
               .getService(Components.interfaces.nsIAppShellService)
               .hiddenDOMWindow;
 
 var uuidgen = Components.classes["@mozilla.org/uuid-generator;1"]
     .getService(Components.interfaces.nsIUUIDGenerator);
 
 function Copy (obj) {
--- a/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
@@ -30,21 +30,16 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 (function(global) {
-   const Cc = Components.classes;
-   const Ci = Components.interfaces;
-   const Cu = Components.utils;
-   const Cr = Components.results;
-
    var exports = {};
 
    var ios = Cc['@mozilla.org/network/io-service;1']
              .getService(Ci.nsIIOService);
 
    var scriptSecurityManager = Cc['@mozilla.org/scriptsecuritymanager;1']
                                .getService(Ci.nsIScriptSecurityManager);