Bug 1436605 - more aggressive patch to replace the remaining Components.interface/Components.utils uses with Ci/Cu in C-C (without calendar). r=jorgk
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 28 Feb 2018 22:29:42 +0100
changeset 31190 d32dfb61ec67ce1aa342fb3d27f93b4b95280924
parent 31189 f675a6fda965f3dbba433b3287f78b6ed1f04c1a
child 31191 dada7b1b4e031e61e9d1522b5860beb9b5621b57
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk
bugs1436605
Bug 1436605 - more aggressive patch to replace the remaining Components.interface/Components.utils uses with Ci/Cu in C-C (without calendar). r=jorgk MozReview-Commit-ID: 4gqWuv5OW3S
chat/content/convbrowser.xml
editor/ui/composer/content/editor.js
im/components/contentHandler.js
im/components/profileMigrator.js
im/content/aboutDialog.xul
im/content/blist.js
im/content/engineManager.js
im/content/jar.mn
im/content/preferences/advanced.js
im/content/preferences/applicationManager.js
im/content/preferences/connection.js
im/content/preferences/privacy.js
im/content/utilities.js
im/content/viewlog.js
im/modules/ibTagMenu.jsm
ldap/xpcom/src/nsLDAPProtocolHandler.js
mail/base/content/search.xml
mail/base/modules/mailMigrator.js
mail/components/im/content/imconv.xml
mail/components/preferences/connection.js
mail/components/preferences/security.js
mail/test/mozmill/attachment/test-attachment-menus.js
mail/test/mozmill/attachment/test-attachment-size.js
mail/test/mozmill/attachment/test-attachment.js
mail/test/mozmill/composition/test-attachment.js
mail/test/mozmill/notification/test-notification.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/frame.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/httpd.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
mailnews/addrbook/test/unit/test_ldap1.js
mailnews/addrbook/test/unit/test_ldap2.js
mailnews/base/content/charsetList.xml
mailnews/base/content/folderWidgets.xml
mailnews/base/prefs/content/accountUtils.js
mailnews/base/util/errUtils.js
mailnews/compose/test/unit/test_longLines.js
mailnews/mime/jsmime/test/head_xpcshell_glue.js
mailnews/mime/test/unit/test_attachment_size.js
mailnews/test/fakeserver/pop3d.js
mailnews/test/resources/logHelper.js
suite/browser/navigator.js
suite/browser/nsBrowserContentHandler.js
suite/browser/test/browser/browser_alltabslistener.js
suite/browser/test/browser/browser_pluginnotification.js
suite/common/autocomplete/autocomplete.xml
suite/common/bindings/notification.xml
suite/common/console/consoleBindings.xml
suite/common/console/jsconsole-clhandler.js
suite/common/nsContextMenu.js
suite/common/places/nsPlacesAutoComplete.js
suite/common/places/tests/autocomplete/head_autocomplete.js
suite/common/places/tests/browser/browser_library_views_liveupdate.js
suite/common/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
suite/common/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
suite/common/places/tests/chrome/test_bug549192.xul
suite/common/places/tests/chrome/test_bug549491.xul
suite/common/places/tests/chrome/test_treeview_date.xul
suite/common/places/tests/unit/head_bookmarks.js
suite/common/pref/pref-advanced.js
suite/common/pref/pref-applications.js
suite/common/pref/pref-download.js
suite/common/pref/pref-locationbar.js
suite/common/pref/pref-navigator.js
suite/common/pref/pref-proxies.js
suite/common/pref/pref-smartupdate.js
suite/common/pref/pref-spelling.js
suite/common/search/engineManager.js
suite/common/src/nsSuiteDownloadManagerUI.js
suite/common/src/nsSuiteGlue.js
suite/common/sync/aboutSyncTabs.js
suite/common/sync/syncAddDevice.js
suite/common/sync/syncGenericChange.js
suite/common/sync/syncQuota.js
suite/common/sync/syncSetup.js
suite/common/tests/browser/browser_477657.js
suite/common/tests/browser/browser_markPageAsFollowedLink.js
suite/common/tests/chrome/test_idcheck.xul
suite/common/utilityOverlay.js
suite/extensions/debugQA/content/debugQAMenuOverlay.js
suite/feeds/src/FeedWriter.js
suite/mailnews/addrbook/abTrees.js
suite/mailnews/mailWindowOverlay.js
suite/mailnews/modules/MailUtils.js
suite/mailnews/prefs/pref-mailnews.js
suite/mailnews/prefs/pref-notifications.js
suite/modules/DownloadTaskbarProgress.jsm
suite/modules/Sanitizer.jsm
suite/modules/WindowsJumpLists.jsm
suite/modules/WindowsPreviewPerTab.jsm
suite/modules/test/unit/head.js
suite/profile/migration.js
--- a/chat/content/convbrowser.xml
+++ b/chat/content/convbrowser.xml
@@ -119,17 +119,17 @@
       </property>
 
       <field name="_fastFind">null</field>
       <property name="fastFind"
                 readonly="true">
         <getter>
         <![CDATA[
           if (!this._fastFind) {
-            if (!("@mozilla.org/typeaheadfind;1" in Components.classes))
+            if (!("@mozilla.org/typeaheadfind;1" in Cc))
               return null;
 
             if (!this.docShell)
               return null;
 
             this._fastFind = Cc["@mozilla.org/typeaheadfind;1"]
                                .createInstance(Ci.nsITypeAheadFind);
             this._fastFind.init(this.docShell);
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -2487,24 +2487,24 @@ function getColorAndSetColorWell(ColorPi
     }
   }
   return color;
 }
 
 //-----------------------------------------------------------------------------------
 function IsSpellCheckerInstalled()
 {
-  return "@mozilla.org/spellchecker;1" in Components.classes;
+  return "@mozilla.org/spellchecker;1" in Cc;
 }
 
 //-----------------------------------------------------------------------------------
 function IsFindInstalled()
 {
-  return "@mozilla.org/embedcomp/rangefind;1" in Components.classes
-          && "@mozilla.org/find/find_service;1" in Components.classes;
+  return "@mozilla.org/embedcomp/rangefind;1" in Cc
+          && "@mozilla.org/find/find_service;1" in Cc;
 }
 
 //-----------------------------------------------------------------------------------
 function RemoveInapplicableUIElements()
 {
   // For items that are in their own menu block, remove associated separator
   // (we can't use "hidden" since class="hide-in-IM" CSS rule interferes)
 
--- a/im/components/contentHandler.js
+++ b/im/components/contentHandler.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 contentHandler() {
 }
 contentHandler.prototype = {
   classID: Components.ID("{fda46332-1b03-4940-a30c-0997445d8e34}"),
 
--- a/im/components/profileMigrator.js
+++ b/im/components/profileMigrator.js
@@ -1,15 +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/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var Cc = Components.classes;
-var Ci = Components.interfaces;
 
 function InstantbirdProfileMigrator() { }
 
 InstantbirdProfileMigrator.prototype = {
   import: function() {
     var root = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties)
                                                           .get("DefProfRt", Ci.nsIFile);
     if (root.leafName == "Profiles")
--- a/im/content/aboutDialog.xul
+++ b/im/content/aboutDialog.xul
@@ -46,17 +46,17 @@
           versionField.value = versionField.value + xai.version
                              + ' (' + xai.appBuildID + ')';
 
           versionField = document.getElementById("geckoVersionField");
           versionField.value = versionField.value + xai.platformVersion
                              + ' (' + xai.platformBuildID + ')';
 
           versionField = document.getElementById("libpurpleVersionField");
-          if ("@instantbird.org/libpurple/core;1" in Components.classes) {
+          if ("@instantbird.org/libpurple/core;1" in Cc) {
             var pcs = Cc["@instantbird.org/libpurple/core;1"]
                         .getService(Ci.purpleICoreService);
             versionField.value = versionField.value + pcs.version;
           }
           else {
             versionField.hidden = true;
           }
 
--- a/im/content/blist.js
+++ b/im/content/blist.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 Cu = Components.utils;
-
 ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 var events = ["buddy-authorization-request",
                 "buddy-authorization-request-canceled",
                 "contact-availability-changed",
                 "contact-added",
--- a/im/content/engineManager.js
+++ b/im/content/engineManager.js
@@ -1,15 +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 Ci = Components.interfaces;
-var Cc = Components.classes;
-
 var ENGINE_FLAVOR = "text/x-moz-search-engine";
 
 var gEngineView = null;
 
 var gEngineManagerDialog = {
   init: function engineManager_init() {
     gEngineView = new EngineView(new EngineStore());
 
--- a/im/content/jar.mn
+++ b/im/content/jar.mn
@@ -72,17 +72,17 @@ instantbird.jar:
 #else
 	content/instantbird/menus-unix.xul
 #endif
 *	content/instantbird/preferences/advanced.xul            (preferences/advanced.xul)
 *	content/instantbird/preferences/advanced.js             (preferences/advanced.js)
 	content/instantbird/preferences/applications.xul        (preferences/applications.xul)
 *	content/instantbird/preferences/applications.js         (preferences/applications.js)
 	content/instantbird/preferences/applicationManager.xul  (preferences/applicationManager.xul)
-*	content/instantbird/preferences/applicationManager.js   (preferences/applicationManager.js)
+ 	content/instantbird/preferences/applicationManager.js   (preferences/applicationManager.js)
 *	content/instantbird/preferences/colors.xul              (preferences/colors.xul)
 	content/instantbird/preferences/content.xul             (preferences/content.xul)
 	content/instantbird/preferences/content.js              (preferences/content.js)
 *	content/instantbird/preferences/connection.xul          (preferences/connection.xul)
 	content/instantbird/preferences/connection.js           (preferences/connection.js)
 	content/instantbird/preferences/handlers.xml            (preferences/handlers.xml)
 	content/instantbird/preferences/handlers.css            (preferences/handlers.css)
 *	content/instantbird/preferences/main.xul                (preferences/main.xul)
--- a/im/content/preferences/advanced.js
+++ b/im/content/preferences/advanced.js
@@ -201,17 +201,17 @@ var gAdvancedPane = {
   },
 
   /**
    * Adapt the content of the connection groupbox depending on libpurple being
    * there or not.
    */
   updateConnectionGroupbox: function ()
   {
-    let hasLibpurple = "@instantbird.org/libpurple/core;1" in Components.classes;
+    let hasLibpurple = "@instantbird.org/libpurple/core;1" in Cc;
     // Hide explanatory header and libpurple section.
     document.getElementById("connectionGroupHeader").hidden = !hasLibpurple;
     document.getElementById("connectionGroupSeparator").hidden = !hasLibpurple;
     document.getElementById("purpleConnectionBox").hidden = !hasLibpurple;
     // Choose appropriate label for the Mozilla proxy options.
     document.getElementById("mozConnLabelWithoutLibpurple").hidden = hasLibpurple;
     document.getElementById("mozConnLabelWithLibpurple").hidden = !hasLibpurple;
   },
--- a/im/content/preferences/applicationManager.js
+++ b/im/content/preferences/applicationManager.js
@@ -1,16 +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/.
-
-#ifdef XP_MACOSX
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-#endif
+/* 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 gAppManagerDialog = {
   _removed: [],
 
   init: function appManager_init() {
     this.handlerInfo = window.arguments[0];
 
     var bundle = document.getElementById("appManagerBundle");
--- a/im/content/preferences/connection.js
+++ b/im/content/preferences/connection.js
@@ -49,17 +49,17 @@ var gConnectionsDialog = {
     
     this.sanitizeNoProxiesPref();
     
     return true;
   },
 
   checkForSystemProxy: function ()
   {
-    if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
+    if ("@mozilla.org/system-proxy-settings;1" in Cc)
       document.getElementById("systemPref").removeAttribute("hidden");
   },
   
   proxyTypeChanged: function ()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
 
     // Update http
--- a/im/content/preferences/privacy.js
+++ b/im/content/preferences/privacy.js
@@ -28,19 +28,16 @@ var gPrivacyPane = {
     if (document.getElementById("messenger.status.awayWhenIdle").value)
       textbox.removeAttribute("disabled");
     else
       textbox.setAttribute("disabled", "true");
   },
 
   openLogFolder: function ()
   {
-    let Cc = Components.classes;
-    let Ci = Components.interfaces;
-
     // Log folder is "'profile directory'/logs"
     var logFolder = Services.dirsvc.get("ProfD", Ci.nsIFile);
     logFolder.append("logs");
 
     try {
       logFolder.reveal();
     } catch (e) {
       // Adapted the workaround of Firefox' Download Manager for some *ix systems
@@ -104,17 +101,16 @@ var gPrivacyPane = {
 
   /**
    * Displays the "remove master password" dialog to allow the user to remove
    * the current master password.  When the dialog is dismissed, master password
    * UI is automatically updated.
    */
   _removeMasterPassword: function ()
   {
-    const Cc = Components.classes, Ci = Components.interfaces;
     var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"].
                    getService(Ci.nsIPKCS11ModuleDB);
     if (secmodDB.isFIPSEnabled) {
       var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                           getService(Ci.nsIPromptService);
       var bundle = document.getElementById("bundleMasterPwPreferences");
       promptService.alert(window,
                           bundle.getString("pw_change_failed_title"),
--- a/im/content/utilities.js
+++ b/im/content/utilities.js
@@ -1,13 +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:///modules/imServices.jsm");
 
 function* getIter(aEnumerator)
 {
   while (aEnumerator.hasMoreElements())
     yield aEnumerator.getNext();
 }
--- a/im/content/viewlog.js
+++ b/im/content/viewlog.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 Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // viewZoomOverlay.js and macgestures.js use this.
 function getBrowser() {
   let deck = document.getElementById("browserDeck");
   let id = (parseInt(deck.selectedIndex, 10) ? "conv" : "text") + "-browser";
   let browser = document.getElementById(id);
   browser.selectedBrowser = browser; // for macgestures.js
--- a/im/modules/ibTagMenu.jsm
+++ b/im/modules/ibTagMenu.jsm
@@ -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/. */
 
 this.EXPORTED_SYMBOLS = ["TagMenu"];
 
-var Cu = Components.utils;
 ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://instantbird/locale/instantbird.properties")
 );
 
 // aOnTag and aOnAddTag will be called with aParent as the this value.
--- a/ldap/xpcom/src/nsLDAPProtocolHandler.js
+++ b/ldap/xpcom/src/nsLDAPProtocolHandler.js
@@ -29,17 +29,17 @@ function makeProtocolHandler(aCID, aProt
       return url;
     },
 
     newChannel: function (aURI) {
       return this.newChannel2(aURI, null);
     },
 
     newChannel2: function (aURI, aLoadInfo) {
-      if ("@mozilla.org/network/ldap-channel;1" in Components.classes) {
+      if ("@mozilla.org/network/ldap-channel;1" in Cc) {
         var channel = Cc["@mozilla.org/network/ldap-channel;1"]
                         .createInstance(Ci.nsIChannel);
         channel.init(aURI);
         return channel;
       }
 
       throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     },
--- a/mail/base/content/search.xml
+++ b/mail/base/content/search.xml
@@ -46,19 +46,16 @@
         this.clearSearch();
         event.preventDefault();
         event.stopPropagation();
       ]]></handler>
     </handlers>
 
     <implementation implements="nsIObserver">
       <constructor><![CDATA[
-        const Cc = Components.classes;
-        const Ci = Components.interfaces;
-        const Cu = Components.utils;
         ChromeUtils.import("resource:///modules/errUtils.js");
         ChromeUtils.import("resource://gre/modules/Services.jsm");
         ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
         try {
           this.setAttribute(
             "placeholder",
             this.getAttribute("emptytextbase")
--- a/mail/base/modules/mailMigrator.js
+++ b/mail/base/modules/mailMigrator.js
@@ -56,17 +56,17 @@ var MailMigrator = {
   },
 
   /**
    * Migrate to ClearType fonts (Cambria, Calibri and Consolas) on Windows Vista
    * and above.
    */
   migrateToClearTypeFonts: function MailMigrator_migrateToClearTypeFonts() {
     // Windows...
-    if ("@mozilla.org/windows-registry-key;1" in Components.classes) {
+    if ("@mozilla.org/windows-registry-key;1" in Cc) {
       // Only migrate on Vista (Windows version 6.0) and above
       if (Services.sysinfo.getPropertyAsDouble("version") >= 6.0) {
         let fontPrefVersion =
           Services.prefs.getIntPref("mail.font.windows.version");
         if (fontPrefVersion < 2) {
           let fonts = {
             serif: "Cambria",
             sans: "Calibri",
--- a/mail/components/im/content/imconv.xml
+++ b/mail/components/im/content/imconv.xml
@@ -233,17 +233,17 @@
       <body>
       <![CDATA[
         // If Enter or Return is pressed, focus the input box.
         if (aEvent.keyCode == aEvent.DOM_VK_RETURN) {
           this.convView.focus();
           return;
         }
 
-        let isMac = "nsILocalFileMac" in Components.interfaces;
+        let isMac = "nsILocalFileMac" in Ci;
         let accelKeyPressed = isMac ? aEvent.metaKey : aEvent.ctrlKey;
         // If a character was typed or the accel+v copy shortcut was used,
         // focus the input box and resend the key event.
         if (aEvent.charCode != 0 && !aEvent.altKey &&
             (accelKeyPressed && aEvent.charCode == 'v'.charCodeAt(0) ||
              !aEvent.ctrlKey && !aEvent.metaKey)) {
           this.convView.focus();
 
--- a/mail/components/preferences/connection.js
+++ b/mail/components/preferences/connection.js
@@ -37,17 +37,17 @@ var gConnectionsDialog = {
     var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
     noProxiesPref.value = noProxiesPref.value.replace(/[;]/g,',');
 
     return true;
   },
 
   checkForSystemProxy: function ()
   {
-    if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
+    if ("@mozilla.org/system-proxy-settings;1" in Cc)
       document.getElementById("systemPref").removeAttribute("hidden");
   },
 
   proxyTypeChanged: function ()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
 
     // Update http
--- a/mail/components/preferences/security.js
+++ b/mail/components/preferences/security.js
@@ -129,17 +129,16 @@ var gSecurityPane = {
 
   /**
    * Displays the "remove master password" dialog to allow the user to remove
    * the current master password.  When the dialog is dismissed, master password
    * UI is automatically updated.
    */
   _removeMasterPassword: function ()
   {
-    const Cc = Components.classes, Ci = Components.interfaces;
     var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"].
                    getService(Ci.nsIPKCS11ModuleDB);
     if (secmodDB.isFIPSEnabled) {
       let bundle = document.getElementById("bundleMasterPwPreferences");
       Services.prompt.alert(window,
                             bundle.getString("pw_change_failed_title"),
                             bundle.getString("pw_change2empty_in_fips_mode"));
     }
--- a/mail/test/mozmill/attachment/test-attachment-menus.js
+++ b/mail/test/mozmill/attachment/test-attachment-menus.js
@@ -122,17 +122,17 @@ function setupModule(module) {
 
   /* Today's gory details (thanks to Jonathan Protzenko): libmime somehow
    * counts the trailing newline for an attachment MIME part. Most of the time,
    * assuming attachment has N bytes (no matter what's inside, newlines or
    * not), libmime will return N + 1 bytes. On Linux and Mac, this always
    * holds. However, on Windows, if the attachment is not encoded (that is, is
    * inline text), libmime will return N + 2 bytes.
    */
-  epsilon = ("@mozilla.org/windows-registry-key;1" in Components.classes) ? 2 : 1;
+  epsilon = ("@mozilla.org/windows-registry-key;1" in Cc) ? 2 : 1;
 
   // set up our detached/deleted attachments
   var thisFilePath = os.getFileForPath(__file__);
 
   var detachedFile = os.getFileForPath(os.abspath(detachedName, thisFilePath));
   var detached = create_body_part(
     "Here is a file",
     [create_detached_attachment(detachedFile, "text/plain")]
--- a/mail/test/mozmill/attachment/test-attachment-size.js
+++ b/mail/test/mozmill/attachment/test-attachment-size.js
@@ -153,17 +153,17 @@ function setupModule(module) {
 
   /* Today's gory details (thanks to Jonathan Protzenko): libmime somehow
    * counts the trailing newline for an attachment MIME part. Most of the time,
    * assuming attachment has N bytes (no matter what's inside, newlines or
    * not), libmime will return N + 1 bytes. On Linux and Mac, this always
    * holds. However, on Windows, if the attachment is not encoded (that is, is
    * inline text), libmime will return N + 2 bytes.
    */
-  epsilon = ('@mozilla.org/windows-registry-key;1' in Components.classes) ? 4 : 2;
+  epsilon = ('@mozilla.org/windows-registry-key;1' in Cc) ? 4 : 2;
 
   // set up our detached/deleted attachments
   var thisFilePath = os.getFileForPath(__file__);
 
   var detachedFile = os.getFileForPath(os.abspath(detachedName, thisFilePath));
   var detached = create_body_part(
     'Here is a file',
     [create_detached_attachment(detachedFile, 'text/plain')]
--- a/mail/test/mozmill/attachment/test-attachment.js
+++ b/mail/test/mozmill/attachment/test-attachment.js
@@ -109,17 +109,17 @@ var setupModule = function (module) {
                       filename: 'ubik.txt__________.evil',
                       sanitizedFilename: 'ubik.txt_…_.evil',
                       format: '' }],
     },
   ];
 
   // Add another evilly-named attachment for Windows tests, to ensure that
   // trailing periods are stripped.
-  if ('@mozilla.org/windows-registry-key;1' in Components.classes) {
+  if ('@mozilla.org/windows-registry-key;1' in Cc) {
     messages.push({ attachments: [{ body: textAttachment,
                                     contentType: 'application/octet-stream',
                                     filename: 'ubik.evil. . . . . . . . . ....',
                                     sanitizedFilename: 'ubik.evil',
                                     format: '' }],
                   });
   }
 
--- a/mail/test/mozmill/composition/test-attachment.js
+++ b/mail/test/mozmill/composition/test-attachment.js
@@ -43,17 +43,17 @@ function setupModule(module) {
     collector.getModule(lib).installInto(module);
   }
 
   folder = create_folder('ComposeAttachmentA');
 
   messenger = Cc['@mozilla.org/messenger;1']
                 .createInstance(Ci.nsIMessenger);
 
-  isWindows = '@mozilla.org/windows-registry-key;1' in Components.classes;
+  isWindows = '@mozilla.org/windows-registry-key;1' in Cc;
 
   /* Today's gory details (thanks to Jonathan Protzenko): libmime somehow
    * counts the trailing newline for an attachment MIME part. Most of the time,
    * assuming attachment has N bytes (no matter what's inside, newlines or
    * not), libmime will return N + 1 bytes. On Linux and Mac, this always
    * holds. However, on Windows, if the attachment is not encoded (that is, is
    * inline text), libmime will return N + 2 bytes. Since we're dealing with
    * forwarded message data here, the bonus byte(s) appear twice.
--- a/mail/test/mozmill/notification/test-notification.js
+++ b/mail/test/mozmill/notification/test-notification.js
@@ -100,18 +100,18 @@ function setupModule(module) {
                              "@mozilla.org/system-alerts-service;1",
                              gMockAlertsServiceFactory);
 
   // Ensure we have enabled new mail notifications
   remember_and_set_bool_pref("mail.biff.show_alert", true);
 
   // Ensure that system notifications are used (relevant for Linux only)
   if (Services.appinfo.OS == "Linux" ||
-      ("@mozilla.org/gio-service;1" in Components.classes) ||
-      ("@mozilla.org/gnome-gconf-service;1" in Components.classes))
+      ("@mozilla.org/gio-service;1" in Cc) ||
+      ("@mozilla.org/gnome-gconf-service;1" in Cc))
     remember_and_set_bool_pref("mail.biff.use_system_alert", true);
 
   MailServices.accounts.localFoldersServer.performingBiff = true;
 
   // Create a second identity to check cross-account
   // notifications.
   var identity2 = MailServices.accounts.createIdentity();
   identity2.email = "new-account@foo.invalid";
--- a/mail/test/resources/mozmill/mozmill/extension/resource/modules/frame.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/modules/frame.js
@@ -98,29 +98,24 @@ var loadFile = function(path, collector)
 
   var module = new Cu.Sandbox(systemPrincipal, { wantGlobalProperties: ["ChromeUtils"] });
   module.registeredFunctions = registeredFunctions;
   module.collector = collector
   loadTestResources();
   module.mozmill = mozmill;
   module.elementslib = elementslib;
   module.persisted = persisted;
-  module.Cc = Components.classes;
-  module.Ci = Components.interfaces;
-  module.Cu = Components.utils;
+  module.Cc = Cc;
+  module.Ci = Ci;
+  module.Cu = Cu;
   module.require = function (mod) {
     var loader = new securableModule.Loader({
       rootPaths: [ios.newFileURI(file.parent).spec],
       defaultPrincipal: "system",
-      globals : { mozmill: mozmill,
-                  elementslib: elementslib,
-                  persisted: persisted,
-                  Cc: Components.classes,
-                  Ci: Components.interfaces,
-                  Cu: Components.utils }
+      globals : { mozmill, elementslib, persistsed, Cc, Ci, Cu }
     });
     if (modules != undefined) {
         loader.modules = modules;
     }
     var retval = loader.require(mod);
     modules = loader.modules;
     return retval;
   }
--- a/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/httpd.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/httpd.js
@@ -35,20 +35,16 @@ this.EXPORTED_SYMBOLS = [
   "HTTP_504",
   "HTTP_505",
   "HttpError",
   "HttpServer",
 ];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
 var CC = Components.Constructor;
 
 var PR_UINT32_MAX = Math.pow(2, 32) - 1;
 
 /** True if debugging output is enabled, false otherwise. */
 var DEBUG = false; // non-const *only* so tweakable in server tests
 
 /** True if debugging output should be timestamped. */
--- a/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
+++ b/mail/test/resources/mozmill/mozmill/extension/resource/stdlib/securable-module.js
@@ -187,23 +187,21 @@
      this.globals = options.globals;
    };
 
    exports.Loader.prototype = {
      _makeRequire: function _makeRequire(rootDir) {
        var self = this;
        return function require(module) {
          if (module == "chrome") {
-           var chrome = { Cc: Components.classes,
-                          Ci: Components.interfaces,
-                          Cu: Components.utils,
-                          Cr: Components.results,
-                          Cm: Components.manager,
-                          components: Components
-                        };
+           var chrome = { 
+             Cc, Ci, Cu, Cr, 
+             Cm: Components.manager,
+             components: Components
+           };
            return chrome;
          }
          var path = self.fs.resolveModule(rootDir, module);
          if (!path)
            throw new Error('Module "' + module + '" not found');
          if (!(path in self.modules)) {
            var options = self.fs.getFile(path);
            if (options.filename === undefined)
--- a/mailnews/addrbook/test/unit/test_ldap1.js
+++ b/mailnews/addrbook/test/unit/test_ldap1.js
@@ -5,17 +5,17 @@
 
 var kLDAPDirectory = 0; // defined in nsDirPrefs.h
 var kLDAPUriPrefix = "moz-abldapdirectory://";
 var kLDAPTestSpec = "ldap://invalidhost//dc=intranet??sub?(objectclass=*)";
 
 function run_test() {
   // If nsIAbLDAPDirectory doesn't exist in our build options, someone has
   // specified --disable-ldap
-  if (!("nsIAbLDAPDirectory" in Components.interfaces))
+  if (!("nsIAbLDAPDirectory" in Ci))
     return;
 
   // Test - Create an LDAP directory
   let abUri = MailServices.ab.newAddressBook("test", kLDAPTestSpec, kLDAPDirectory);
 
   // Test - Check we have the directory.
   let abDir = MailServices.ab.getDirectory(kLDAPUriPrefix + abUri)
                              .QueryInterface(Ci.nsIAbLDAPDirectory);
--- a/mailnews/addrbook/test/unit/test_ldap2.js
+++ b/mailnews/addrbook/test/unit/test_ldap2.js
@@ -6,17 +6,17 @@
 
 var kLDAPDirectory = 0; // defined in nsDirPrefs.h
 var kLDAPUriPrefix = "moz-abldapdirectory://";
 var kLDAPTestSpec = "ldap://invalidhost//dc=intranet??sub?(objectclass=*)";
 
 function run_test() {
   // If nsIAbLDAPDirectory doesn't exist in our build options, someone has
   // specified --disable-ldap
-  if (!("nsIAbLDAPDirectory" in Components.interfaces))
+  if (!("nsIAbLDAPDirectory" in Ci))
     return;
 
   // Test - Create an LDAP directory
 
   // Use a UTF-8 based directory name
   var abUri =
     MailServices.ab.newAddressBook("\u041C\u0435\u043B\u0435\u043D\u043A\u0438",
                                    kLDAPTestSpec, kLDAPDirectory);
--- a/mailnews/base/content/charsetList.xml
+++ b/mailnews/base/content/charsetList.xml
@@ -52,18 +52,16 @@
 
         menuLabels.forEach(function(item) {
           aMenuList.appendItem(item.label, item.value);
         });
 
         // Selecting appropiate menu item corresponding to preference stored
         // value.
         if (this.hasAttribute("preference")) {
-          const Ci = Components.interfaces;
-
           let preference = Services.prefs.getComplexValue(
             this.getAttribute("preference"), Ci.nsIPrefLocalizedString);
           this.value = preference.data;
         }
      ]]></constructor>
     </implementation>
   </binding>
 </bindings>
--- a/mailnews/base/content/folderWidgets.xml
+++ b/mailnews/base/content/folderWidgets.xml
@@ -303,19 +303,16 @@
          - Call this if you are unsure whether the menu-items have been built,
          - but know that they need to be built now if they haven't.
         -->
       <method name="_ensureInitialized">
         <body><![CDATA[
           if (this._initialized)
             return;
 
-          // I really wish they'd just make this global...
-          const Ci = Components.interfaces;
-
           let folders;
 
           // Figure out which folders to build.  If we don't have a parent, then
           // we assume we should build the top-level accounts. (Actually we
           // build the fake root folders for those accounts.)
           if (!this._parentFolder) {
             let accounts = this.allAccountsSorted(true);
 
@@ -570,18 +567,16 @@
       </method>
 
       <!--
          - Builds a submenu with all of the recently used folders in it, to
          - allow for easy access.
         -->
       <method name="_buildRecentMenu">
         <body><![CDATA[
-          const Ci = Components.interfaces;
-
           // Iterate through all folders in all accounts, and find 15 (_MAXRECENT)
           // of most recently modified ones.
           let allFolders = this.toArray(
             this.fixIterator(this.MailServices.accounts.allFolders, Ci.nsIMsgFolder));
 
           allFolders = allFolders.filter(f => f.canFileMessages);
 
           let recentFolders = this.getMostRecentFolders(allFolders,
--- a/mailnews/base/prefs/content/accountUtils.js
+++ b/mailnews/base/prefs/content/accountUtils.js
@@ -150,17 +150,17 @@ function verifyAccounts(wizardCallback, 
 
           // we didn't create the MsgAccountWizard - we need to verify that local folders exists.
           if (!localFoldersExists)
             MailServices.accounts.createLocalMailAccount();
         }
 
         // This will do nothing on platforms without a shell service
         const NS_SHELLSERVICE_CID = "@mozilla.org/suite/shell-service;1"
-        if (NS_SHELLSERVICE_CID in Components.classes)
+        if (NS_SHELLSERVICE_CID in Cc)
         {
           // hack, set a time out to do this, so that the window can load first
           setTimeout(showMailIntegrationDialog, 0);
         }
         return ret;
     }
     catch (ex) {
         dump("error verifying accounts " + ex + "\n");
--- a/mailnews/base/util/errUtils.js
+++ b/mailnews/base/util/errUtils.js
@@ -116,18 +116,17 @@ Stringifier.prototype = {
 
   _asString: function() {
     let str = this._buffer.join('');
     this._reset();
     return str;
   },
 
   getStack: function(skipCount) {
-    if (!((typeof Components == "object") &&
-          (typeof Components.classes == "object")))
+    if (typeof Components != "object" || typeof Cc != "object")
       return "No stack trace available.";
     if (typeof(skipCount) === undefined)
       skipCount = 0;
 
     let frame = Components.stack.caller;
     let str = "<top>";
 
     while (frame) {
--- a/mailnews/compose/test/unit/test_longLines.js
+++ b/mailnews/compose/test/unit/test_longLines.js
@@ -84,17 +84,17 @@ let longMultibyteLineCJK = "안".repeat(400);
 // And some Japanese.
 let longMultibyteLineJapanese = "語".repeat(450);
 
 function* testBodyWithLongLine() {
   let newline;
   // Windows uses CR+LF, the other platforms just LF.
   // Note: Services.appinfo.OS returns "XPCShell" in the test, so we
   // use this hacky condition to separate Windows from the others.
-  if ("@mozilla.org/windows-registry-key;1" in Components.classes) {
+  if ("@mozilla.org/windows-registry-key;1" in Cc) {
     newline = "\r\n";
   } else {
     newline = "\n";
   }
 
   let fields = new CompFields();
   let identity = getSmtpIdentity("from@tinderbox.invalid",
     getBasicSmtpServer());
--- a/mailnews/mime/jsmime/test/head_xpcshell_glue.js
+++ b/mailnews/mime/jsmime/test/head_xpcshell_glue.js
@@ -15,17 +15,16 @@ assert.doesNotThrow = function (block, m
     block();
   } catch (e) {
     this.report(true, e, null, 'Got unwanted exception' + message);
   }
 };
 requireCache.set("assert", assert);
 
 // Preload an fs module
-var Cc = Components.classes, Ci = Components.interfaces;
 var fs = {
   readFile: function (filename, options, callback) {
     if (callback === undefined) {
       callback = options;
       options = {};
     }
 
     // Convert according to encoding. For the moment, we don't support this
--- a/mailnews/mime/test/unit/test_attachment_size.js
+++ b/mailnews/mime/test/unit/test_attachment_size.js
@@ -30,17 +30,17 @@ var scenarios = gMessageScenarioFactory 
 
 /* Today's gory details (thanks to Jonathan Protzenko): libmime somehow
  * counts the trailing newline for an attachment MIME part. Most of the time,
  * assuming attachment has N bytes (no matter what's inside, newlines or
  * not), libmime will return N + 1 bytes. On Linux and Mac, this always
  * holds. However, on Windows, if the attachment is not encoded (that is, is
  * inline text), libmime will return N + 2 bytes.
  */
-var epsilon = ('@mozilla.org/windows-registry-key;1' in Components.classes) ? 4 : 2;
+var epsilon = ('@mozilla.org/windows-registry-key;1' in Cc) ? 4 : 2;
 
 var textAttachment =
   "Can't make the frug contest, Helen; stomach's upset. I'll fix you, " +
   "Ubik! Ubik drops you back in the thick of things fast. Taken as " +
   "directed, Ubik speeds relief to head and stomach. Remember: Ubik is " +
   "only seconds away. Avoid prolonged use.";
 
 var binaryAttachment = textAttachment;
--- a/mailnews/test/fakeserver/pop3d.js
+++ b/mailnews/test/fakeserver/pop3d.js
@@ -29,17 +29,17 @@ var gUIDLCount = 1;
  *                 the cwd.
  */
 function readFile(fileName) {
   let cwd = Services.dirsvc.get("CurWorkD", Ci.nsIFile);
 
   // Try to find the file relative to either the data directory or to the
   // current working directory.
   let file = cwd.clone();
-  if ("@mozilla.org/windows-registry-key;1" in Components.classes) {
+  if ("@mozilla.org/windows-registry-key;1" in Cc) {
     // Windows doesn't allow '..' in appendRelativePath,
     // so we'll have to do this the long way.
     if (fileName.includes('/')) {
       let parts = fileName.split('/');
       for (let part of parts) {
         if (part == "..")
           file = file.parent;
         else
--- a/mailnews/test/resources/logHelper.js
+++ b/mailnews/test/resources/logHelper.js
@@ -70,17 +70,17 @@ var _errorConsoleTunnel = {
           // of console errors during testing, so disable (we hope temporarily)
           // failing on XPCOM console errors (see bug 1014350).
           // An XPCOM error aMessage looks like this:
           //   [JavaScript Error: "uncaught exception: 2147500037"]
           // Capture the number, and allow known XPCOM results.
           let matches = /exception: (\d+)/.exec(aMessage);
           let XPCOMresult = null;
           if (matches) {
-            for (let result in Components.results) {
+            for (let result in Cr) {
               if (matches[1] == Cr[result])
               {
                 XPCOMresult = result;
                 break;
               }
             }
             let message = XPCOMresult || aMessage;
             if (logHelperAllowedErrors.some(e => e == matches[1]))
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -697,17 +697,17 @@ function Startup()
     setTimeout(WindowFocusTimerCallback, 0, gURLBar);
   else
     setTimeout(WindowFocusTimerCallback, 0, content);
 
   // hook up browser access support
   window.browserDOMWindow = new nsBrowserAccess();
 
   // hook up remote support
-  if (!gPrivate && REMOTESERVICE_CONTRACTID in Components.classes) {
+  if (!gPrivate && REMOTESERVICE_CONTRACTID in Cc) {
     var remoteService =
       Cc[REMOTESERVICE_CONTRACTID]
         .getService(Ci.nsIRemoteService);
     remoteService.registerWindow(window);
   }
 
   // ensure login manager is loaded
   Cc["@mozilla.org/login-manager;1"].getService();
@@ -2537,25 +2537,24 @@ function toHistory()
 function maybeInitPopupContext()
 {
   // it's not a popup with no opener
   if (!window.content.opener)
     return null;
 
   try {
     // are we a popup window?
-    const CI = Components.interfaces;
     var xulwin = window
-                 .QueryInterface(CI.nsIInterfaceRequestor)
-                 .getInterface(CI.nsIWebNavigation)
-                 .QueryInterface(CI.nsIDocShellTreeItem).treeOwner
-                 .QueryInterface(CI.nsIInterfaceRequestor)
-                 .getInterface(CI.nsIXULWindow);
+                 .QueryInterface(Ci.nsIInterfaceRequestor)
+                 .getInterface(Ci.nsIWebNavigation)
+                 .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
+                 .QueryInterface(Ci.nsIInterfaceRequestor)
+                 .getInterface(Ci.nsIXULWindow);
     if (xulwin.contextFlags &
-        CI.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) {
+        Ci.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) {
       // return our opener's URI
       return Services.io.newURI(window.content.opener.location.href);
     }
   } catch(e) {
   }
   return null;
 }
 
@@ -2635,40 +2634,36 @@ function isClosingLastBrowser() {
  * file upload support
  */
 
 /* This function returns the URI of the currently focused content frame
  * or frameset.
  */
 function getCurrentURI()
 {
-  const CI = Components.interfaces;
-
   var focusedWindow = document.commandDispatcher.focusedWindow;
   var contentFrame = isContentFrame(focusedWindow) ? focusedWindow : window.content;
 
-  var nav = contentFrame.QueryInterface(CI.nsIInterfaceRequestor)
-                        .getInterface(CI.nsIWebNavigation);
+  var nav = contentFrame.QueryInterface(Ci.nsIInterfaceRequestor)
+                        .getInterface(Ci.nsIWebNavigation);
   return nav.currentURI;
 }
 
 function uploadFile(fileURL)
 {
-  const CI = Components.interfaces;
-
   var targetBaseURI = getCurrentURI();
 
   // generate the target URI.  we use fileURL.file.leafName to get the
   // unicode value of the target filename w/o any URI-escaped chars.
   // this gives the protocol handler the best chance of generating a
   // properly formatted URI spec.  we pass null for the origin charset
   // parameter since we want the URI to inherit the origin charset
   // property from targetBaseURI.
 
-  var leafName = fileURL.QueryInterface(CI.nsIFileURL).file.leafName;
+  var leafName = fileURL.QueryInterface(Ci.nsIFileURL).file.leafName;
 
   var targetURI = Services.io.newURI(leafName, null, targetBaseURI);
 
   // ok, start uploading...
   openDialog("chrome://communicator/content/downloads/uploadProgress.xul", "",
              "titlebar,centerscreen,minimizable,dialog=no", fileURL, targetURI);
 }
 
--- a/suite/browser/nsBrowserContentHandler.js
+++ b/suite/browser/nsBrowserContentHandler.js
@@ -478,17 +478,17 @@ var nsBrowserContentHandler = {
 
       var prefBranch = Services.prefs.getBranch("general.startup.");
 
       var startupArray = prefBranch.getChildList("");
 
       for (var i = 0; i < startupArray.length; ++i) {
         this.currentArgument = startupArray[i];
         var contract = NS_GENERAL_STARTUP_PREFIX + this.currentArgument;
-        if (contract in Components.classes) {
+        if (contract in Cc) {
           // Ignore any exceptions - we can't do anything about them here.
           try {
             if (prefBranch.getBoolPref(this.currentArgument)) {
               var handler = Cc[contract].getService(nsICommandLineHandler);
               if (handler.wrappedJSObject)
                 handler.wrappedJSObject.handle(this);
               else
                 handler.handle(this);
--- a/suite/browser/test/browser/browser_alltabslistener.js
+++ b/suite/browser/test/browser/browser_alltabslistener.js
@@ -1,10 +1,8 @@
-const Ci = Components.interfaces;
-
 const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
                        Ci.nsIWebProgressListener.STATE_IS_NETWORK;
 
 var gFrontProgressListener = {
   onProgressChange: function (aWebProgress, aRequest,
                               aCurSelfProgress, aMaxSelfProgress,
                               aCurTotalProgress, aMaxTotalProgress) {
   },
--- a/suite/browser/test/browser/browser_pluginnotification.js
+++ b/suite/browser/test/browser/browser_pluginnotification.js
@@ -614,19 +614,17 @@ function test17() {
   ok(!missingNotification, "Test 17, Should not have a missing plugin notification");
 
   setAndUpdateBlocklist(gHttpTestRoot + "blockPluginVulnerableUpdatable.xml",
   function() {
     prepareTest(test18a, gHttpTestRoot + "plugin_test.html");
   });
 }
 
-const Cr = Components.results;
 const Cm = Components.manager;
-const Cc = Components.classes;
 const gReg = Cm.QueryInterface(Ci.nsIComponentRegistrar);
 const gRealBlocklistServiceCID = Cc["@mozilla.org/extensions/blocklist;1"];
 const gFakeBlocklistServiceCID = Components.ID("{614b68a0-3c53-4ec0-8146-28cc1e25f8a1}");
 var gFactory = null;
 
 // Tests a vulnerable, updatable plugin
 function test18a() {
   var clickToPlayNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
--- a/suite/common/autocomplete/autocomplete.xml
+++ b/suite/common/autocomplete/autocomplete.xml
@@ -227,17 +227,17 @@
                 onget="return this.getAttribute('focused') == 'true';"/>
 
       <method name="initAutoCompleteSearch">
         <body><![CDATA[
           var list = this.getAttribute("autocompletesearch").split(" ");
           for (var i = 0; i < list.length; i++) {
             var name = list[i];
             var contractid = "@mozilla.org/autocomplete/search;1?name=" + name;
-            if (contractid in Components.classes) {
+            if (contractid in Cc) {
               try {
                 this.mSessions[name] =
                   Cc[contractid].getService(Ci.nsIAutoCompleteSearch);
                 this.mLastResults[name] = null;
                 this.mLastRows[name] = 0;
                 ++this.sessionCount;
               } catch (e) {
                 dump("### ERROR - unable to create search \"" + name + "\".\n");
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -2012,17 +2012,17 @@
           this._prefs.addObserver("plugins.hide_infobar_for_outdated_plugin", this);
           this._prefs.addObserver("plugins.hide_infobar_for_carbon_failure_plugin", this);
           this._prefs.addObserver("plugins.hide_infobar_for_missing_plugin", this);
           this._prefs.addObserver("privacy.popups.showBrowserMessage", this);
           this._prefs.addObserver("dom.disable_open_during_load", this);
 
           this.addProgressListener();
 
-          if ("nsICrashReporter" in Components.interfaces)
+          if ("nsICrashReporter" in Ci)
             ChromeUtils.import("resource://gre/modules/CrashSubmit.jsm", this);
         ]]>
       </constructor>
 
       <destructor>
         <![CDATA[
           this.destroy();
         ]]>
@@ -2415,17 +2415,17 @@
               .getService(nsIAppStartup)
               .quit(nsIAppStartup.eAttemptQuit |
                             nsIAppStartup.eRestart |
                             nsIAppStartup.eRestarti386);
           }
 
           var notification = "carbon-failure-plugins";
           var pref = "plugins.hide_infobar_for_carbon_failure_plugin";
-          if ("@mozilla.org/xpcom/mac-utils;1" in Components.classes &&
+          if ("@mozilla.org/xpcom/mac-utils;1" in Cc &&
               !Cc["@mozilla.org/xpcom/mac-utils;1"]
                  .getService(Ci.nsIMacUtils)
                  .isUniversalBinary) {
             pref = null;
             notification = "missing-plugins";
             callback = this.openURLPref.bind(this, "plugins.update.url");
           }
 
--- a/suite/common/console/consoleBindings.xml
+++ b/suite/common/console/consoleBindings.xml
@@ -192,17 +192,16 @@
           let endPosition = aString.length;
           if (aMiddleCharacter - halfLimit >= 0)
             startPosition = aMiddleCharacter - halfLimit;
           if (aMiddleCharacter + halfLimit <= aString.length)
             endPosition = aMiddleCharacter + halfLimit;
           if (endPosition - startPosition < this.fieldMaxLength)
             endPosition += this.fieldMaxLength - (endPosition - startPosition);
           let truncatedString = aString.substring(startPosition, endPosition);
-          let Ci = Components.interfaces;
           let ellipsis = Services.prefs.getComplexValue("intl.ellipsis",
                                                         Ci.nsIPrefLocalizedString).data;
           if (startPosition > 0) {
             truncatedString = ellipsis + truncatedString;
             aMiddleCharacter += ellipsis.length;
           }
           if (endPosition < aString.length)
             truncatedString = truncatedString + ellipsis;
--- a/suite/common/console/jsconsole-clhandler.js
+++ b/suite/common/console/jsconsole-clhandler.js
@@ -1,15 +1,13 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 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/. */
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function jsConsoleHandler() {}
 jsConsoleHandler.prototype = {
   handle: function clh_handle(cmdLine) {
     if (!cmdLine.handleFlag("suiteconsole", false))
       return;
--- a/suite/common/nsContextMenu.js
+++ b/suite/common/nsContextMenu.js
@@ -232,17 +232,17 @@ nsContextMenu.prototype = {
     this.showItem("context-inspect", showInspect);
 
     this.showItem("context-sep-properties",
                   !(this.inDirList || this.isContentSelected || this.onTextInput ||
                     this.onCanvas || this.onVideo || this.onAudio));
     // Set Desktop Background depends on whether an image was clicked on,
     // and requires the shell service.
     var canSetDesktopBackground = false;
-    if ("@mozilla.org/suite/shell-service;1" in Components.classes) try {
+    if ("@mozilla.org/suite/shell-service;1" in Cc) try {
       canSetDesktopBackground =
           Cc["@mozilla.org/suite/shell-service;1"]
             .getService(Ci.nsIShellService)
             .canSetDesktopBackground;
     } catch (e) {
     }
     this.showItem("context-setDesktopBackground",
                   canSetDesktopBackground && (this.onLoadedImage || this.onStandaloneImage));
@@ -778,26 +778,25 @@ nsContextMenu.prototype = {
 
   initPopupPrincipal: function() {
     // quick check: if no opener, it can't be a popup
     if (!window.content.opener)
       return;
     try {
       var show = false;
       // is it a popup window?
-      const CI = Components.interfaces;
       var xulwin = window
-                  .QueryInterface(CI.nsIInterfaceRequestor)
-                  .getInterface(CI.nsIWebNavigation)
-                  .QueryInterface(CI.nsIDocShellTreeItem)
+                  .QueryInterface(Ci.nsIInterfaceRequestor)
+                  .getInterface(Ci.nsIWebNavigation)
+                  .QueryInterface(Ci.nsIDocShellTreeItem)
                   .treeOwner
-                  .QueryInterface(CI.nsIInterfaceRequestor)
-                  .getInterface(CI.nsIXULWindow);
+                  .QueryInterface(Ci.nsIInterfaceRequestor)
+                  .getInterface(Ci.nsIXULWindow);
       if (xulwin.contextFlags &
-          CI.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) {
+          Ci.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) {
         // do the pref settings allow site-by-site popup management?
         show = !Services.prefs.getBoolPref("dom.disable_open_during_load");
       }
       if (show) {
         // initialize popupPrincipal
         this.popupPrincipal = window.content.opener.document.nodePrincipal;
       }
     } catch(e) {
--- a/suite/common/places/nsPlacesAutoComplete.js
+++ b/suite/common/places/nsPlacesAutoComplete.js
@@ -9,20 +9,16 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
                                "resource://gre/modules/PlacesUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "NetUtil",
                                "resource://gre/modules/NetUtil.jsm");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-
 // This SQL query fragment provides the following:
 //   - whether the entry is bookmarked (kQueryIndexBookmarked)
 //   - the bookmark title, if it is a bookmark (kQueryIndexBookmarkTitle)
 //   - the tags associated with a bookmarked entry (kQueryIndexTags)
 const kBookTagSQLFragment =
   `EXISTS(SELECT 1 FROM moz_bookmarks WHERE fk = h.id) AS bookmarked,
    (
      SELECT title FROM moz_bookmarks WHERE fk = h.id AND title NOTNULL
--- a/suite/common/places/tests/autocomplete/head_autocomplete.js
+++ b/suite/common/places/tests/autocomplete/head_autocomplete.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 Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Import common head.
 {
   let commonFile = do_get_file("../head_common.js", false);
   let uri = Services.io.newFileURI(commonFile);
   Services.scriptloader.loadSubScript(uri.spec, this);
 }
--- a/suite/common/places/tests/browser/browser_library_views_liveupdate.js
+++ b/suite/common/places/tests/browser/browser_library_views_liveupdate.js
@@ -1,19 +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 Library Left pane view for liveupdate.
  */
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
 var gLibrary = null;
 
 function test() {
   waitForExplicitFinish();
   // This test takes quite some time, and timeouts frequently, so we require
   // more time to run.
   // See Bug 525610.
   requestLongerTimeout(2);
--- a/suite/common/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
+++ b/suite/common/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
@@ -39,19 +39,16 @@
   <![CDATA[
 
      /**
       * Bug 427633 - Disable creating a New Folder in the bookmarks dialogs if
       * insertionPoint is invalid.
       */
 
     function runTest() {
-      const Cc = Components.classes;
-      const Ci = Components.interfaces;
-
       var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
                getService(Ci.nsINavBookmarksService);
       var ios = Cc["@mozilla.org/network/io-service;1"].
                 getService(Ci.nsIIOService);
       function uri(spec) {
         return ios.newURI(spec);
       }
 
--- a/suite/common/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
+++ b/suite/common/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
@@ -34,19 +34,16 @@
   <body xmlns="http://www.w3.org/1999/xhtml" />
 
   <vbox id="editBookmarkPanelContent"/>
 
   <script type="application/javascript">
   <![CDATA[
 
     function runTest() {
-      const Cc = Components.classes;
-      const Ci = Components.interfaces;
-
       var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
                getService(Ci.nsINavBookmarksService);
       var ts = Cc["@mozilla.org/browser/tagging-service;1"].
                getService(Ci.nsITaggingService);
       var ios = Cc["@mozilla.org/network/io-service;1"].
                 getService(Ci.nsIIOService);
       function uri(spec) {
         return ios.newURI(spec);
--- a/suite/common/places/tests/chrome/test_bug549192.xul
+++ b/suite/common/places/tests/chrome/test_bug549192.xul
@@ -39,18 +39,16 @@
     /**
      * Bug 1388827 / Bug 874407
      * Ensures that history views are updated properly after visits.
      *
      * Bug 549192
      * Ensures that history views are updated after deleting entries.
      */
       ChromeUtils.import("resource://gre/modules/Services.jsm");
-      const Cc = Components.classes;
-      const Ci = Components.interfaces;
 
     SimpleTest.waitForExplicitFinish();
 
     function runTest() {
       // The mochitest page is added to history.
       waitForClearHistory(continue_test);
     }
 
--- a/suite/common/places/tests/chrome/test_bug549491.xul
+++ b/suite/common/places/tests/chrome/test_bug549491.xul
@@ -41,18 +41,16 @@
     /**
      * Bug 549491
      * https://bugzilla.mozilla.org/show_bug.cgi?id=549491
      *
      * Ensures that changing the details of places tree's root-node doesn't
      * throw.
      */
       ChromeUtils.import("resource://gre/modules/Services.jsm");
-      const Cc = Components.classes;
-      const Ci = Components.interfaces;
 
     SimpleTest.waitForExplicitFinish();
 
     function runTest() {
       // The mochitest page is added to history.
       waitForClearHistory(continue_test);
     }
 
--- a/suite/common/places/tests/chrome/test_treeview_date.xul
+++ b/suite/common/places/tests/chrome/test_treeview_date.xul
@@ -47,18 +47,16 @@
 
     /**
      * Bug 435322
      * https://bugzilla.mozilla.org/show_bug.cgi?id=435322
      *
      * Ensures that date in places treeviews is correctly formatted.
      */
       ChromeUtils.import("resource://gre/modules/Services.jsm");
-      const Cc = Components.classes;
-      const Ci = Components.interfaces;
 
     SimpleTest.waitForExplicitFinish();
 
     function runTest() {
       // The mochitest page is added to history.
       waitForClearHistory(continue_test);
     }
 
--- a/suite/common/places/tests/unit/head_bookmarks.js
+++ b/suite/common/places/tests/unit/head_bookmarks.js
@@ -1,18 +1,13 @@
 /* -*- Mode: C++; 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/. */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Import common head.
 var commonFile = do_get_file("../head_common.js", false);
 var uri = Services.io.newFileURI(commonFile);
 Services.scriptloader.loadSubScript(uri.spec, this);
 
 // Put any other stuff relative to this test folder below.
--- a/suite/common/pref/pref-advanced.js
+++ b/suite/common/pref/pref-advanced.js
@@ -12,37 +12,37 @@ function Startup()
 
 /**
  * System preferences
  */
 
 function SysPrefCheck()
 {
   const kPrefService = "@mozilla.org/system-preference-service;1";
-  let visible = kPrefService in Components.classes &&
+  let visible = kPrefService in Cc &&
     Cc[kPrefService].getService() instanceof Ci.nsIPrefBranch;
   document.getElementById("systemPrefs").hidden = !visible;
 }
 
 function ShellServiceCheck()
 {
   const NS_SHELLSERVICE_CID = "@mozilla.org/suite/shell-service;1";
 
-  if (NS_SHELLSERVICE_CID in Components.classes) try {
+  if (NS_SHELLSERVICE_CID in Cc) try {
     Cc[NS_SHELLSERVICE_CID]
       .getService(Ci.nsIShellService)
       .shouldCheckDefaultClient;
     document.getElementById("checkDefault").hidden = false;
   } catch (e) {
   }
 }
 
 function CrashReportsCheck()
 {
-  if ("nsICrashReporter" in Components.interfaces)
+  if ("nsICrashReporter" in Ci)
   {
     var cr = Cc["@mozilla.org/toolkit/crash-reporter;1"]
                .getService(Ci.nsICrashReporter);
     document.getElementById("crashReports").hidden = !cr.enabled;
     document.getElementById("submitCrashes").checked = cr.submitReports;
   }
 }
 
--- a/suite/common/pref/pref-applications.js
+++ b/suite/common/pref/pref-applications.js
@@ -27,17 +27,17 @@ var handlerSvc = Cc["@mozilla.org/uriloa
                    .getService(Ci.nsIHandlerService);
 var categoryMgr = Cc["@mozilla.org/categorymanager;1"]
                     .getService(Ci.nsICategoryManager);
 var mimeSvc = Cc["@mozilla.org/mime;1"]
                 .getService(Ci.nsIMIMEService);
 var converterSvc = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"]
                      .getService(Ci.nsIWebContentConverterService);
 var shellSvc = null;
-if ("@mozilla.org/suite/shell-service;1" in Components.classes)
+if ("@mozilla.org/suite/shell-service;1" in Cc)
   shellSvc = Cc["@mozilla.org/suite/shell-service;1"]
                .getService(Ci.nsIShellService);
 
 const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
 const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed";
 const TYPE_MAYBE_AUDIO_FEED = "application/vnd.mozilla.maybe.audio.feed";
 
 const PREF_DISABLED_PLUGIN_TYPES = "plugin.disable_full_page_plugin_for_types";
@@ -92,23 +92,23 @@ const PREF_AUDIO_FEED_SELECTED_READER = 
 const kActionUsePlugin = -3;
 const kActionChooseApp = -2;
 const kActionManageApp = -1;
 
 //****************************************************************************//
 // Utilities
 
 function getFileDisplayName(aFile) {
-  if ("nsILocalFileWin" in Components.interfaces &&
+  if ("nsILocalFileWin" in Ci &&
       aFile instanceof Ci.nsILocalFileWin) {
     try {
       return aFile.getVersionInfoField("FileDescription");
     } catch (e) {}
   }
-  else if ("nsILocalFileMac" in Components.interfaces &&
+  else if ("nsILocalFileMac" in Ci &&
            aFile instanceof Ci.nsILocalFileMac) {
     try {
       return aFile.bundleDisplayName;
     } catch (e) {}
   }
   return aFile.leafName;
 }
 
--- a/suite/common/pref/pref-download.js
+++ b/suite/common/pref/pref-download.js
@@ -16,17 +16,17 @@ function Startup()
                           .QueryInterface(Ci.nsIFileProtocolHandler);
   gSoundUrlPref = document.getElementById("browser.download.finished_sound_url");
   SetSoundEnabled(document.getElementById("browser.download.finished_download_sound").value);
 
   // if we don't have the alert service, hide the pref UI for using alerts to
   // notify on download completion
   // see bug #158711
   var downloadDoneNotificationAlertUI = document.getElementById("finishedNotificationAlert");
-  downloadDoneNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes);
+  downloadDoneNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Cc);
 }
 
 /**
   * Enables/disables the folder field and Browse button based on whether a
   * default download directory is being used.
   */
 function ReadUseDownloadDir()
 {
--- a/suite/common/pref/pref-locationbar.js
+++ b/suite/common/pref/pref-locationbar.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function Startup()
 {
   // On systems that has the file view component, autoFill and showPopup will
   // return results from local browsing "history", even if autocomplete.enabled
   // is turned off, so we'll need to remove the dependent look in the ui.
 
-  if ("@mozilla.org/autocomplete/search;1?name=file" in Components.classes)
+  if ("@mozilla.org/autocomplete/search;1?name=file" in Cc)
   {
     // We indent the checkboxes with the class attribute set to "indent", so
     // just remove the attribute.
     document.getElementById("autoFill").removeAttribute("class");
     document.getElementById("showPopup").removeAttribute("class");
   }
 
   updateDependent();
--- a/suite/common/pref/pref-navigator.js
+++ b/suite/common/pref/pref-navigator.js
@@ -279,17 +279,17 @@ function IsDefaultBrowser()
 
   return shellSvc.isDefaultClient(false, nsIShellService.BROWSER);
 }
 
 function InitPlatformIntegration()
 {
   const NS_SHELLSERVICE_CID = "@mozilla.org/suite/shell-service;1";
 
-  if (NS_SHELLSERVICE_CID in Components.classes) try {
+  if (NS_SHELLSERVICE_CID in Cc) try {
     var desc = document.getElementById("defaultBrowserDesc");
     if (IsDefaultBrowser())
       desc.textContent = desc.getAttribute("desc1");
     else {
       desc.textContent = desc.getAttribute("desc0");
       document.getElementById("defaultBrowserButton").disabled = false;
     }
 
--- a/suite/common/pref/pref-proxies.js
+++ b/suite/common/pref/pref-proxies.js
@@ -23,17 +23,17 @@ var gShareSettings;
 // Only used by main prefwindow
 function Startup()
 {
   InitCommonGlobals();
   gAutoURL = document.getElementById("network.proxy.autoconfig_url");
   gProxyType = document.getElementById("network.proxy.type");
 
   // Check for system proxy settings class and unhide UI if present
-  if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
+  if ("@mozilla.org/system-proxy-settings;1" in Cc)
     document.getElementById("systemPref").hidden = false;
 
   // Calculate a sane default for network.proxy.share_proxy_settings.
   if (gShareSettings.value == null)
     gShareSettings.value = DefaultForShareSettingsPref();
 
   // The pref value 3 (kObsoleteProxy) for network.proxy.type is unused to
   // maintain backwards compatibility. Treat 3 (kObsoleteProxy) equally to
--- a/suite/common/pref/pref-smartupdate.js
+++ b/suite/common/pref/pref-smartupdate.js
@@ -2,17 +2,17 @@
 /* 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 gCanCheckForUpdates;
 
 function Startup()
 {
-  var hasUpdater = "nsIApplicationUpdateService" in Components.interfaces;
+  var hasUpdater = "nsIApplicationUpdateService" in Ci;
 
   if (hasUpdater)
   {
     var aus = Cc["@mozilla.org/updates/update-service;1"]
                 .getService(Ci.nsIApplicationUpdateService);
     gCanCheckForUpdates = aus.canCheckForUpdates;
 
     UpdateAddonsItems();
--- a/suite/common/pref/pref-spelling.js
+++ b/suite/common/pref/pref-spelling.js
@@ -2,17 +2,17 @@
 /* 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 gDictCount = 0;
 var gLastSelectedLang;
 
 function Startup() {
-  if ("@mozilla.org/spellchecker;1" in Components.classes)
+  if ("@mozilla.org/spellchecker;1" in Cc)
     InitLanguageMenu();
   else
   {
     document.getElementById("generalSpelling").hidden = true;
     document.getElementById("mailSpelling").hidden = true;
     document.getElementById("noSpellCheckLabel").hidden = false;
   }
 }
--- a/suite/common/search/engineManager.js
+++ b/suite/common/search/engineManager.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/. */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
                                "resource://gre/modules/PlacesUtils.jsm");
-const Ci = Components.interfaces;
-const Cc = Components.classes;
 
 const ENGINE_FLAVOR = "text/x-moz-search-engine";
 
 const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled";
 
 var gEngineView = null;
 
 var gEngineManagerDialog = {
--- a/suite/common/src/nsSuiteDownloadManagerUI.js
+++ b/suite/common/src/nsSuiteDownloadManagerUI.js
@@ -3,19 +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
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
 const TOOLKIT_MANAGER_URL = "chrome://mozapps/content/downloads/downloads.xul";
 const DOWNLOAD_MANAGER_URL = "chrome://communicator/content/downloads/downloadmanager.xul";
 const PREF_FOCUS_WHEN_STARTING = "browser.download.manager.focusWhenStarting";
 const PREF_FLASH_COUNT = "browser.download.manager.flashCount";
 const PREF_DM_BEHAVIOR = "browser.download.manager.behavior";
 const PREF_FORCE_TOOLKIT_UI = "browser.download.manager.useToolkitUI";
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -236,20 +236,20 @@ SuiteGlue.prototype = {
           .loadFrameScript("chrome://navigator/content/content.js", true);
         ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
         ChromeUtils.import("resource://gre/modules/Downloads.jsm");
         ChromeUtils.import("resource://gre/modules/DownloadIntegration.jsm");
         DownloadIntegration.shouldPersistDownload = function() { return true; }
         Downloads.getList(Downloads.ALL).then(list => list.addView(this))
                                         .then(() => gDownloadsLoaded = true);
 
-        if ("@mozilla.org/widget/macdocksupport;1" in Components.classes)
+        if ("@mozilla.org/widget/macdocksupport;1" in Cc)
           gTaskbarProgress = Cc["@mozilla.org/widget/macdocksupport;1"]
                                .getService(Ci.nsITaskbarProgress);
-        else if ("@mozilla.org/windows-taskbar;1" in Components.classes) {
+        else if ("@mozilla.org/windows-taskbar;1" in Cc) {
           gWinTaskbar = Cc["@mozilla.org/windows-taskbar;1"]
                           .getService(Ci.nsIWinTaskbar);
           if (!gWinTaskbar.available) {
             gWinTaskbar = null;
             break;
           }
         } else {
           break;
@@ -632,17 +632,17 @@ SuiteGlue.prototype = {
     }
 
     var notifyBox = browser.getNotificationBox();
 
     // Show about:rights notification, if needed.
     if (this._shouldShowRights())
       this._showRightsNotification(notifyBox);
 
-    if ("@mozilla.org/windows-taskbar;1" in Components.classes &&
+    if ("@mozilla.org/windows-taskbar;1" in Cc &&
         Cc["@mozilla.org/windows-taskbar;1"]
           .getService(Ci.nsIWinTaskbar).available) {
       let temp = {};
       ChromeUtils.import("resource:///modules/WindowsJumpLists.jsm", temp);
       temp.WinTaskbarJumpList.startup();
     }
 
     // Load the "more info" page for a locked places.sqlite
@@ -915,17 +915,17 @@ SuiteGlue.prototype = {
     return (buildTime + maxAge <= now);
   },
 
   // This method gets the shell service and has it check its settings.
   // This will do nothing on platforms without a shell service.
   _checkForDefaultClient: function checkForDefaultClient(aWindow)
   {
     const NS_SHELLSERVICE_CID = "@mozilla.org/suite/shell-service;1";
-    if (NS_SHELLSERVICE_CID in Components.classes) try {
+    if (NS_SHELLSERVICE_CID in Cc) try {
       var nsIShellService = Ci.nsIShellService;
 
       var shellService = Cc[NS_SHELLSERVICE_CID]
                            .getService(nsIShellService);
       var appTypes = shellService.shouldBeDefaultClientFor;
 
       // Show the default client dialog only if we should check for the default
       // client and we aren't already the default for the stored app types in
--- a/suite/common/sync/aboutSyncTabs.js
+++ b/suite/common/sync/aboutSyncTabs.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/. */
 
-const Cu = Components.utils;
-
 ChromeUtils.import("resource://services-sync/main.js");
 ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
 ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var RemoteTabViewer = {
   _tabsList: null,
 
--- a/suite/common/sync/syncAddDevice.js
+++ b/suite/common/sync/syncAddDevice.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/. */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
-
 ChromeUtils.import("resource://services-sync/main.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const PIN_PART_LENGTH = 4;
 
 const ADD_DEVICE_PAGE       = 0;
 const SYNC_KEY_PAGE         = 1;
 const DEVICE_CONNECTED_PAGE = 2;
--- a/suite/common/sync/syncGenericChange.js
+++ b/suite/common/sync/syncGenericChange.js
@@ -1,15 +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/. */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-
 ChromeUtils.import("resource://services-sync/main.js");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var Change = {
   _dialog: null,
   _dialogType: null,
   _status: null,
   _statusIcon: null,
--- a/suite/common/sync/syncQuota.js
+++ b/suite/common/sync/syncQuota.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/. */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
-
 ChromeUtils.import("resource://services-sync/main.js");
 ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
 
 var gSyncQuota = {
 
   init: function init() {
     this.bundle = document.getElementById("quotaStrings");
     let caption = document.getElementById("treeCaption");
--- a/suite/common/sync/syncSetup.js
+++ b/suite/common/sync/syncSetup.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/. */
 
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
-
 // page consts
 
 const INTRO_PAGE                    = 0;
 const NEW_ACCOUNT_START_PAGE        = 1;
 const NEW_ACCOUNT_PP_PAGE           = 2;
 const NEW_ACCOUNT_CAPTCHA_PAGE      = 3;
 const EXISTING_ACCOUNT_CONNECT_PAGE = 4;
 const EXISTING_ACCOUNT_LOGIN_PAGE   = 5;
--- a/suite/common/tests/browser/browser_477657.js
+++ b/suite/common/tests/browser/browser_477657.js
@@ -12,17 +12,17 @@ function browserWindowsCount() {
   return count;
 }
 
 function test() {
   /** Test for Bug 477657 **/
   is(browserWindowsCount(), 1, "Only one browser window should be open initially");
 
   // Test fails randomly on OS X (bug 482975)
-  if ("nsILocalFileMac" in Components.interfaces)
+  if ("nsILocalFileMac" in Ci)
     return;
 
   waitForExplicitFinish();
 
   let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
   newWin.addEventListener("load", function loadListener(aEvent) {
     newWin.removeEventListener("load", loadListener);
 
--- a/suite/common/tests/browser/browser_markPageAsFollowedLink.js
+++ b/suite/common/tests/browser/browser_markPageAsFollowedLink.js
@@ -1,19 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 /**
  * Tests that visits across frames are correctly represented in the database.
  */
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
 const BASE_URL = "http://mochi.test:8888/browser/suite/common/tests/browser";
 const PAGE_URL = BASE_URL + "/framedPage.html";
 const LEFT_URL = BASE_URL + "/frameLeft.html";
 const RIGHT_URL = BASE_URL + "/frameRight.html";
 
 var gTabLoaded = false;
 var gLeftFrameVisited = false;
 
--- a/suite/common/tests/chrome/test_idcheck.xul
+++ b/suite/common/tests/chrome/test_idcheck.xul
@@ -16,20 +16,16 @@
           src="chrome://mochikit/content/MochiKit/packed.js"/>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="chrome://mochikit/content/chrome-harness.js"/>
 
   <script type="application/javascript">
   <![CDATA[
-    // mailTestUtils.js requires these constants, so we may as well use them
-    const Cc = Components.classes;
-    const Ci = Components.interfaces;
-
     let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
                 getService(Ci.mozIJSSubScriptLoader);
 
     let rootDir = getRootDirectory(window.location.href);
     scriptLoader.loadSubScript(rootDir + "mailTestUtils.js", this);
 
     var gLoadedWindows = {};
 
--- a/suite/common/utilityOverlay.js
+++ b/suite/common/utilityOverlay.js
@@ -710,17 +710,17 @@ function checkForUpdates()
   if (um.activeUpdate && um.activeUpdate.state == "pending")
     prompter.showUpdateDownloaded(um.activeUpdate);
   else
     prompter.checkForUpdates();
 }
 
 function updateCheckUpdatesItem()
 {
-  var hasUpdater = "nsIApplicationUpdateService" in Components.interfaces;
+  var hasUpdater = "nsIApplicationUpdateService" in Ci;
   var checkForUpdates = document.getElementById("checkForUpdates");
 
   if (!hasUpdater)
   {
     var updateSeparator = document.getElementById("updateSeparator");
 
     checkForUpdates.hidden = true;
     updateSeparator.hidden = true;
@@ -892,17 +892,17 @@ function utilityOnLoad(aEvent)
   Services.prefs.addObserver("network.proxy.type", proxyTypeObserver);
 
   addEventListener("unload", utilityOnUnload, false);
 
   // set the initial state
   setOfflineUI(Services.io.offline);
 
   // Check for system proxy settings class and show menuitem if present
-  if ("@mozilla.org/system-proxy-settings;1" in Components.classes &&
+  if ("@mozilla.org/system-proxy-settings;1" in Cc &&
       document.getElementById("network-proxy-system"))
     document.getElementById("network-proxy-system").hidden = false;
 }
 
 function utilityOnUnload(aEvent)
 {
   Services.obs.removeObserver(offlineObserver, "network:offline-status-changed");
   Services.prefs.removeObserver("network.proxy.type", proxyTypeObserver);
@@ -1115,17 +1115,16 @@ function BrowserOnCommand(event)
   const ownerDoc = ot.ownerDocument;
   const docURI = ownerDoc.documentURI;
   const buttonID = ot.getAttribute("anonid");
 
   // If the event came from an ssl error page, it is probably either the "Add
   // Exception" or "Get Me Out Of Here" button
   if (docURI.startsWith("about:certerror?")) {
     if (buttonID == "exceptionDialogButton") {
-      const Ci = Components.interfaces;
       let docshell = ownerDoc.defaultView
                              .QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIWebNavigation)
                              .QueryInterface(Ci.nsIDocShell);
       let securityInfo = docshell.failedChannel.securityInfo;
       let sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
                                   .SSLStatus;
 
@@ -1513,19 +1512,16 @@ function openUILinkIn(url, where, aAllow
   openLinkIn(url, where, params);
 }
 
 function openLinkIn(url, where, params)
 {
   if (!where || !url)
     return null;
 
-  const Cc = Components.classes;
-  const Ci = Components.interfaces;
-
   var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
   var aPostData             = params.postData;
   var aReferrerURI          = params.referrerURI;
   var aRelatedToCurrent     = params.relatedToCurrent;
   var aInitiatingDoc = params.initiatingDoc ? params.initiatingDoc : document;
 
   var aReferrerPolicy       = ("referrerPolicy" in params ?
         params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
--- a/suite/extensions/debugQA/content/debugQAMenuOverlay.js
+++ b/suite/extensions/debugQA/content/debugQAMenuOverlay.js
@@ -1,16 +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/. */
 
 // "about:bloat" is available only when
 // (the application is) compiled with |--enable-logrefcnt|.
-if ("@mozilla.org/network/protocol/about;1?what=bloat" in Components.classes)
+if ("@mozilla.org/network/protocol/about;1?what=bloat" in Cc)
   window.addEventListener("load", onLoadBloat);
 
 // Unhide (and enable) the Bloat menu and its associated separator.
 function onLoadBloat()
 {
   window.removeEventListener("load", onLoadBloat);
 
   // Ignore windows which don't get the Debug menu, like 'View Source'.
--- a/suite/feeds/src/FeedWriter.js
+++ b/suite/feeds/src/FeedWriter.js
@@ -584,23 +584,23 @@ FeedWriter.prototype = {
   /**
    * Get the human-readable display name of a file. This could be the
    * application name.
    * @param   file
    *          A nsIFile to look up the name of
    * @returns The display name of the application represented by the file.
    */
   _getFileDisplayName: function getFileDisplayName(file) {
-    if ("nsILocalFileWin" in Components.interfaces &&
+    if ("nsILocalFileWin" in Ci &&
         file instanceof Ci.nsILocalFileWin) {
       try {
         return file.getVersionInfoField("FileDescription");
       } catch (e) {}
     }
-    else if ("nsILocalFileMac" in Components.interfaces &&
+    else if ("nsILocalFileMac" in Ci &&
              file instanceof Ci.nsILocalFileMac) {
       try {
         return file.bundleDisplayName;
       } catch (e) {}
     }
     return file.leafName;
   },
 
--- a/suite/mailnews/addrbook/abTrees.js
+++ b/suite/mailnews/addrbook/abTrees.js
@@ -168,17 +168,17 @@ directoryTreeView.prototype =
       if (aKey == "ab_type")
       {
         if (aDir._directory.URI == kPersonalAddressbookURI)
           return "pab";
         if (aDir._directory.URI == kCollectedAddressbookURI)
           return "cab";
         if (aDir._directory instanceof Ci.nsIAbMDBDirectory)
           return "mork";
-        if ("nsIAbLDAPDirectory" in Components.interfaces &&
+        if ("nsIAbLDAPDirectory" in Ci &&
             aDir._directory instanceof Ci.nsIAbLDAPDirectory)
           return "ldap";
         return "mapi+other";
       }
       else if (aKey == "ab_name")
       {
         return aDir._directory.dirName;
       }
--- a/suite/mailnews/mailWindowOverlay.js
+++ b/suite/mailnews/mailWindowOverlay.js
@@ -33,17 +33,17 @@ var kMsgForwardAsAttachment = 0;
 
 var gMessengerBundle;
 var gOfflineManager;
 var gCopyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                      .getService(Ci.nsIMsgCopyService);
 var gMarkViewedMessageAsReadTimer = null; // if the user has configured the app to mark a message as read if it is viewed for more than n seconds
 
 var gTimelineService = null;
-var gTimelineEnabled = ("@mozilla.org;timeline-service;1" in Components.classes);
+var gTimelineEnabled = ("@mozilla.org;timeline-service;1" in Cc);
 if (gTimelineEnabled) {
   try {
     gTimelineEnabled = Services.prefs.getBoolPref("mailnews.timeline_is_enabled");
     if (gTimelineEnabled) {
       gTimelineService =
         Cc["@mozilla.org;timeline-service;1"].getService(Ci.nsITimelineService);
     }
   }
--- a/suite/mailnews/modules/MailUtils.js
+++ b/suite/mailnews/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"];
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * This module has several utility functions for use by both core and
  * third-party code. Some functions are aimed at code that doesn't have a
  * window context, while others can be used anywhere.
  */
--- a/suite/mailnews/prefs/pref-mailnews.js
+++ b/suite/mailnews/prefs/pref-mailnews.js
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-if ("@mozilla.org/suite/shell-service;1" in Components.classes)
+if ("@mozilla.org/suite/shell-service;1" in Cc)
   var nsIShellService = Ci.nsIShellService;
 
 function Startup()
 {
   startPageCheck();
   defaultClientSetup();
 }
 
@@ -25,17 +25,17 @@ function setHomePageToDefaultPage()
 {
   var startPagePref = document.getElementById("mailnews.start_page.url");
 
   startPagePref.value = startPagePref.defaultValue;
 }
 
 function defaultClientSetup()
 {
-  if ("@mozilla.org/suite/shell-service;1" in Components.classes) try {
+  if ("@mozilla.org/suite/shell-service;1" in Cc) try {
     var shellService = Cc["@mozilla.org/suite/shell-service;1"]
                          .getService(nsIShellService);
 
     ["Mail", "News", "Rss"].forEach(function(aType) {
       var button = document.getElementById("setDefault" + aType);
       try {
         button.disabled = shellService.isDefaultClient(false, nsIShellService[aType.toUpperCase()]);
         document.getElementById("defaultMailPrefs").hidden = false;
--- a/suite/mailnews/prefs/pref-notifications.js
+++ b/suite/mailnews/prefs/pref-notifications.js
@@ -7,17 +7,17 @@
 
 var gSoundUrlPref = null;
 
 function Startup()
 {
   // if we don't have the alert service, hide the pref UI for using alerts to notify on new mail
   // see bug #158711
   var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlertBox");
-  newMailNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes);
+  newMailNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Cc);
 
   // as long as the old notification code is still around, the new options
   // won't apply if mail.biff.show_new_alert is false and should be hidden
   document.getElementById("showAlertPreviewText").hidden =
   document.getElementById("showAlertSubject").hidden =
   document.getElementById("showAlertSender").hidden =
     !Services.prefs.getBoolPref("mail.biff.show_new_alert");
 
--- a/suite/modules/DownloadTaskbarProgress.jsm
+++ b/suite/modules/DownloadTaskbarProgress.jsm
@@ -3,27 +3,23 @@
  * 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 = [
   "DownloadTaskbarProgress",
 ];
 
-// Constants
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-const Cr = Components.results;
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 
+// Constants
+
 const kTaskbarIDWin = "@mozilla.org/windows-taskbar;1";
 const kTaskbarIDMac = "@mozilla.org/widget/macdocksupport;1";
 
 // DownloadTaskbarProgress Object
 
 this.DownloadTaskbarProgress =
 {
   init: function DTP_init()
--- a/suite/modules/Sanitizer.jsm
+++ b/suite/modules/Sanitizer.jsm
@@ -36,17 +36,17 @@ var Sanitizer = {
     var itemPrefs = Services.prefs.getBranch("privacy.item.");
     for (var itemName in this.items) {
       var item = this.items[itemName];
       if ("clear" in item)
         item.willClear = itemPrefs.getBoolPref(itemName);
     }
     if (this._prefs.getBoolPref("promptOnSanitize")) {
       // make this an app-modal window on Mac.
-      var win = "nsILocalFileMac" in Components.interfaces ? null
+      var win = "nsILocalFileMac" in Ci ? null
                                                            : aParentWindow;
       Services.ww.openWindow(win,
                              "chrome://communicator/content/sanitize.xul",
                              "Sanitize",
                              "chrome,titlebar,centerscreen,dialog,modal",
                              null);
     }
   },
--- a/suite/modules/WindowsJumpLists.jsm
+++ b/suite/modules/WindowsJumpLists.jsm
@@ -1,24 +1,20 @@
 /* -*- Mode: C++; 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/. */
 
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+
 /**
  * Constants
  */
 
-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");
-
 // Stop updating jumplists after some idle time.
 const IDLE_TIMEOUT_SECONDS = 5 * 60;
 
 // Prefs
 const PREF_TASKBAR_BRANCH    = "browser.taskbar.lists.";
 const PREF_TASKBAR_ENABLED   = "enabled";
 const PREF_TASKBAR_ITEMCOUNT = "maxListItemCount";
 const PREF_TASKBAR_FREQUENT  = "frequent.enabled";
--- a/suite/modules/WindowsPreviewPerTab.jsm
+++ b/suite/modules/WindowsPreviewPerTab.jsm
@@ -644,17 +644,17 @@ this.AeroPeek = {
 
   // Maximum number of previews.
   maxpreviews: 20,
 
   // Length of time in seconds that previews are cached.
   cacheLifespan: 20,
 
   initialize: function () {
-    if (!(WINTASKBAR_CONTRACTID in Components.classes))
+    if (!(WINTASKBAR_CONTRACTID in Cc))
       return;
     this.taskbar = Cc[WINTASKBAR_CONTRACTID]
                      .getService(Ci.nsIWinTaskbar);
     this.available = this.taskbar.available;
     if (!this.available)
       return;
 
     this.prefs.addObserver(TOGGLE_PREF_NAME, this, true);
--- a/suite/modules/test/unit/head.js
+++ b/suite/modules/test/unit/head.js
@@ -1,13 +1,8 @@
-const Cc = Components.classes;
-const Cu = Components.utils;
-const Cr = Components.results;
-const Ci = Components.interfaces;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
   "resource://gre/modules/PlacesUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "Promise",
   "resource://gre/modules/commonjs/sdk/core/promise.js");
 
 // Need to explicitly load profile for Places
--- a/suite/profile/migration.js
+++ b/suite/profile/migration.js
@@ -71,17 +71,17 @@ var MigrationWizard = {
     // Figure out what source apps are are available to import from:
     var group = document.getElementById("importSourceGroup");
     var firstSelectable = null;
     for (var i = 0; i < group.childNodes.length; ++i) {
       var suffix = group.childNodes[i].id;
       if (suffix != "nothing" && suffix != "fromFile") {
         var contractID = NS_PROFILE_MIGRATOR_CONTRACTID + suffix;
         var migrator = null;
-        if (contractID in Components.classes) {
+        if (contractID in Cc) {
           migrator = Cc[contractID]
                        .createInstance(nsISuiteProfileMigrator);
         } else {
           dump("*** invalid contractID =" + contractID + "\n");
           // This is an invalid contract id, therefore hide this element
           // and allow things to continue - that way we should be able to
           // copy with anything happening.
           group.childNodes[i].hidden = true;