Bug 1609760 - Stop assigning properties to the global `this` in JSMs in Thunderbird (port bug 1608278). r=khushil
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 07 Feb 2020 16:12:35 +0200
changeset 37215 a0dda319d59ba06c195aed2a30ef46eee5d8045e
parent 37214 3fc1169f58c9ef46511cfc88bc86831297f6af79
child 37216 0d533b4b3992aa621f064a70959a84e585d6d9d5
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhushil
bugs1609760, 1608278
Bug 1609760 - Stop assigning properties to the global `this` in JSMs in Thunderbird (port bug 1608278). r=khushil cp ../.gitignore .rgignore && rg -l -g '*.jsm' '' mail | jscodeshift --stdin --transform ~/Code/jsm-rewrites/no-this-property-assign.js (Script from https://github.com/bgrins/jsm-rewrites/blob/d2bbd6c459294b65955442e45b5a7f5dba11e639/no-this-property-assign.js) manually corrected: mail/components/enterprisepolicies/schemas/schema.jsm mail/components/extensions/ExtensionToolbarButtons.jsm mail/extensions/openpgp/content/modules/windows.jsm mail/base/modules/MailConstants.jsm problem cases: mail/base/modules/DNS.jsm mail/components/im/modules/index_im.jsm
mail/base/modules/AppUpdateUI.jsm
mail/base/modules/AttachmentChecker.jsm
mail/base/modules/DBViewWrapper.jsm
mail/base/modules/DNS.jsm
mail/base/modules/ExtensionsUI.jsm
mail/base/modules/MailConstants.jsm
mail/base/modules/MailInstrumentation.jsm
mail/base/modules/MailViewManager.jsm
mail/base/modules/MessageArchiver.jsm
mail/base/modules/QuickFilterManager.jsm
mail/base/modules/SearchSpec.jsm
mail/base/modules/SessionStoreManager.jsm
mail/base/modules/SummaryFrameManager.jsm
mail/base/modules/TBDistCustomizer.jsm
mail/base/modules/Windows8WindowFrameColor.jsm
mail/components/AppIdleManager.jsm
mail/components/activity/modules/activityModules.jsm
mail/components/activity/modules/alertHook.jsm
mail/components/activity/modules/autosync.jsm
mail/components/activity/modules/glodaIndexer.jsm
mail/components/activity/modules/moveCopy.jsm
mail/components/activity/modules/pop3Download.jsm
mail/components/activity/modules/sendLater.jsm
mail/components/cloudfile/cloudFileAccounts.jsm
mail/components/customizableui/CustomizableUI.jsm
mail/components/enterprisepolicies/schemas/schema.jsm
mail/components/extensions/ExtensionToolbarButtons.jsm
mail/components/im/modules/chatHandler.jsm
mail/components/im/modules/chatNotifications.jsm
mail/components/im/modules/index_im.jsm
mail/components/im/modules/search_im.jsm
mail/extensions/openpgp/content/modules/rnp.jsm
mail/extensions/openpgp/content/modules/rnpLib.jsm
mail/extensions/openpgp/content/modules/windows.jsm
mail/test/browser/shared-modules/AccountManagerHelpers.jsm
mail/test/browser/shared-modules/AddressBookHelpers.jsm
mail/test/browser/shared-modules/AttachmentHelpers.jsm
mail/test/browser/shared-modules/CloudfileHelpers.jsm
mail/test/browser/shared-modules/ComposeHelpers.jsm
mail/test/browser/shared-modules/ContentTabHelpers.jsm
mail/test/browser/shared-modules/CustomizationHelpers.jsm
mail/test/browser/shared-modules/DOMHelpers.jsm
mail/test/browser/shared-modules/FolderDisplayHelpers.jsm
mail/test/browser/shared-modules/JunkHelpers.jsm
mail/test/browser/shared-modules/KeyboardHelpers.jsm
mail/test/browser/shared-modules/MessageHelpers.jsm
mail/test/browser/shared-modules/MockObjectHelpers.jsm
mail/test/browser/shared-modules/MouseEventHelpers.jsm
mail/test/browser/shared-modules/NNTPHelpers.jsm
mail/test/browser/shared-modules/NewMailAccountHelpers.jsm
mail/test/browser/shared-modules/NotificationBoxHelpers.jsm
mail/test/browser/shared-modules/PrefTabHelpers.jsm
mail/test/browser/shared-modules/PromptHelpers.jsm
mail/test/browser/shared-modules/QuickFilterBarHelpers.jsm
mail/test/browser/shared-modules/SearchWindowHelpers.jsm
mail/test/browser/shared-modules/SubscribeWindowHelpers.jsm
mail/test/browser/shared-modules/WindowHelpers.jsm
mail/test/browser/shared-modules/httpd.jsm
--- a/mail/base/modules/AppUpdateUI.jsm
+++ b/mail/base/modules/AppUpdateUI.jsm
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["AppUpdateUI"];
+const EXPORTED_SYMBOLS = ["AppUpdateUI"];
 
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 const { BrowserUtils } = ChromeUtils.import(
   "resource://gre/modules/BrowserUtils.jsm"
 );
 const { clearTimeout, setTimeout } = ChromeUtils.import(
--- a/mail/base/modules/AttachmentChecker.jsm
+++ b/mail/base/modules/AttachmentChecker.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["AttachmentChecker"];
+const EXPORTED_SYMBOLS = ["AttachmentChecker"];
 
 var AttachmentChecker = {
   getAttachmentKeywords,
 };
 
 /**
  * Check whether the character is a CJK character or not.
  *
--- a/mail/base/modules/DBViewWrapper.jsm
+++ b/mail/base/modules/DBViewWrapper.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["DBViewWrapper", "IDBViewWrapperListener"];
+const EXPORTED_SYMBOLS = ["DBViewWrapper", "IDBViewWrapperListener"];
 
 const { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
 const { MailViewConstants, MailViewManager } = ChromeUtils.import(
   "resource:///modules/MailViewManager.jsm"
 );
 const { SearchSpec } = ChromeUtils.import("resource:///modules/SearchSpec.jsm");
--- a/mail/base/modules/DNS.jsm
+++ b/mail/base/modules/DNS.jsm
@@ -1,14 +1,20 @@
 /* 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 module is responsible for performing DNS queries using ctypes for
-// loading system DNS libraries on Linux, Mac and Windows.
+/**
+ * This module is responsible for performing DNS queries using ctypes for
+ * loading system DNS libraries on Linux, Mac and Windows.
+ */
+
+const EXPORTED_SYMBOLS = ["DNS"];
+
+var DNS = null;
 
 if (typeof Components !== "undefined") {
   var { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
   var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
   var { BasePromiseWorker } = ChromeUtils.import(
     "resource://gre/modules/PromiseWorker.jsm"
   );
 }
@@ -465,11 +471,10 @@ if (typeof Components === "undefined") {
     },
     txt(aName) {
       return this.lookup(aName, NS_T_TXT);
     },
     mx(aName) {
       return this.lookup(aName, NS_T_MX);
     },
   };
-  this.DNS = dns_async_front;
-  this.EXPORTED_SYMBOLS = ["DNS"];
+  DNS = dns_async_front;
 }
--- a/mail/base/modules/ExtensionsUI.jsm
+++ b/mail/base/modules/ExtensionsUI.jsm
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-this.EXPORTED_SYMBOLS = ["ExtensionsUI"];
+const EXPORTED_SYMBOLS = ["ExtensionsUI"];
 
 const ADDONS_PROPERTIES = "chrome://messenger/locale/addons.properties";
 const BRAND_PROPERTIES = "chrome://branding/locale/brand.properties";
 const DEFAULT_EXTENSION_ICON =
   "chrome://mozapps/skin/extensions/extensionGeneric.svg";
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 
 const { XPCOMUtils } = ChromeUtils.import(
--- a/mail/base/modules/MailConstants.jsm
+++ b/mail/base/modules/MailConstants.jsm
@@ -1,16 +1,16 @@
 #filter substitution
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = ["MailConstants"];
+const EXPORTED_SYMBOLS = ["MailConstants"];
 
 // Immutable for export.
 var MailConstants = Object.freeze({
 
   MOZ_OPENPGP:
 #ifdef MOZ_OPENPGP
   true,
 #else
--- a/mail/base/modules/MailInstrumentation.jsm
+++ b/mail/base/modules/MailInstrumentation.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Thunderbird UI Instrumentation, currently just the account setup process.
  */
 
 /* :::::::: Constants and Helpers ::::::::::::::: */
 
-this.EXPORTED_SYMBOLS = ["MailInstrumentation"];
+const EXPORTED_SYMBOLS = ["MailInstrumentation"];
 
 var nsIMFNService = Ci.nsIMsgFolderNotificationService;
 
 const { logException } = ChromeUtils.import("resource:///modules/ErrUtils.jsm");
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
--- a/mail/base/modules/MailViewManager.jsm
+++ b/mail/base/modules/MailViewManager.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["MailViewManager", "MailViewConstants"];
+const EXPORTED_SYMBOLS = ["MailViewManager", "MailViewConstants"];
 
 /**
  * Put the MailViewConstants in an object so we can export them to
  *  msgViewPickerOverlay in one blob without contaminating everyone's address
  *  space who might want to import us.
  */
 var MailViewConstants = {
   // tag views have kViewTagMarker + their key as value
--- a/mail/base/modules/MessageArchiver.jsm
+++ b/mail/base/modules/MessageArchiver.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["MessageArchiver"];
+const EXPORTED_SYMBOLS = ["MessageArchiver"];
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
 var { MailUtils } = ChromeUtils.import("resource:///modules/MailUtils.jsm");
 
 function MessageArchiver() {
--- a/mail/base/modules/QuickFilterManager.jsm
+++ b/mail/base/modules/QuickFilterManager.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "QuickFilterState",
   "QuickFilterManager",
   "MessageTextFilter",
   "QuickFilterSearchListener",
 ];
 
 const { PluralForm } = ChromeUtils.import(
   "resource://gre/modules/PluralForm.jsm"
--- a/mail/base/modules/SearchSpec.jsm
+++ b/mail/base/modules/SearchSpec.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["SearchSpec"];
+const EXPORTED_SYMBOLS = ["SearchSpec"];
 
 const { fixIterator } = ChromeUtils.import(
   "resource:///modules/iteratorUtils.jsm"
 );
 const { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/base/modules/SessionStoreManager.jsm
+++ b/mail/base/modules/SessionStoreManager.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["SessionStoreManager"];
+const EXPORTED_SYMBOLS = ["SessionStoreManager"];
 
 const { JSONFile } = ChromeUtils.import("resource://gre/modules/JSONFile.jsm");
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * asuth arbitrarily chose this value to trade-off powersaving,
  * processor usage, and recency of state in the face of the impossibility of
  * our crashing; he also worded this.
--- a/mail/base/modules/SummaryFrameManager.jsm
+++ b/mail/base/modules/SummaryFrameManager.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["SummaryFrameManager"];
+const EXPORTED_SYMBOLS = ["SummaryFrameManager"];
 
 /**
  * The SummaryFrameManager manages the source attribute of iframes which can
  * be multi-purposed.  For example, the thread/multimessage summary and the
  * folder summary both use it.  The SummaryFrameManager takes care of
  * causing the content file to be reloaded as necessary, and manages event
  * handlers, so that the right callback is called when the specified
  * document is loaded.
--- a/mail/base/modules/TBDistCustomizer.jsm
+++ b/mail/base/modules/TBDistCustomizer.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["TBDistCustomizer"];
+const EXPORTED_SYMBOLS = ["TBDistCustomizer"];
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 
 var TBDistCustomizer = {
   applyPrefDefaults() {
--- a/mail/base/modules/Windows8WindowFrameColor.jsm
+++ b/mail/base/modules/Windows8WindowFrameColor.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"];
+const EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"];
 
 const { WindowsRegistry } = ChromeUtils.import(
   "resource://gre/modules/WindowsRegistry.jsm"
 );
 
 var Windows8WindowFrameColor = {
   _windowFrameColor: null,
 
--- a/mail/components/AppIdleManager.jsm
+++ b/mail/components/AppIdleManager.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["appIdleManager"];
+const EXPORTED_SYMBOLS = ["appIdleManager"];
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // This module provides a mechanism to turn window focus and blur events
 // into app idle notifications. If we get a blur notification that is not
 // followed by a focus notification in less than some small number of seconds,
 // then we send a begin app idle notification.
 // If we get a focus event, and we're app idle, then we send an end app idle
--- a/mail/components/activity/modules/activityModules.jsm
+++ b/mail/components/activity/modules/activityModules.jsm
@@ -1,17 +1,17 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This module is designed to be a central place to initialise activity related
 // modules.
 
-this.EXPORTED_SYMBOLS = [];
+const EXPORTED_SYMBOLS = [];
 
 const { sendLaterModule } = ChromeUtils.import(
   "resource:///modules/activity/sendLater.jsm"
 );
 sendLaterModule.init();
 const { moveCopyModule } = ChromeUtils.import(
   "resource:///modules/activity/moveCopy.jsm"
 );
--- a/mail/components/activity/modules/alertHook.jsm
+++ b/mail/components/activity/modules/alertHook.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["alertHook"];
+const EXPORTED_SYMBOLS = ["alertHook"];
 
 var nsActWarning = Components.Constructor(
   "@mozilla.org/activity-warning;1",
   "nsIActivityWarning",
   "init"
 );
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/autosync.jsm
+++ b/mail/components/activity/modules/autosync.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["autosyncModule"];
+const EXPORTED_SYMBOLS = ["autosyncModule"];
 
 var nsActProcess = Components.Constructor(
   "@mozilla.org/activity-process;1",
   "nsIActivityProcess",
   "init"
 );
 var nsActEvent = Components.Constructor(
   "@mozilla.org/activity-event;1",
--- a/mail/components/activity/modules/glodaIndexer.jsm
+++ b/mail/components/activity/modules/glodaIndexer.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["glodaIndexerActivity"];
+const EXPORTED_SYMBOLS = ["glodaIndexerActivity"];
 
 var nsActProcess = Components.Constructor(
   "@mozilla.org/activity-process;1",
   "nsIActivityProcess",
   "init"
 );
 var nsActEvent = Components.Constructor(
   "@mozilla.org/activity-event;1",
--- a/mail/components/activity/modules/moveCopy.jsm
+++ b/mail/components/activity/modules/moveCopy.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["moveCopyModule"];
+const EXPORTED_SYMBOLS = ["moveCopyModule"];
 
 var nsActEvent = Components.Constructor(
   "@mozilla.org/activity-event;1",
   "nsIActivityEvent",
   "init"
 );
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/pop3Download.jsm
+++ b/mail/components/activity/modules/pop3Download.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["pop3DownloadModule"];
+const EXPORTED_SYMBOLS = ["pop3DownloadModule"];
 
 var nsActEvent = Components.Constructor(
   "@mozilla.org/activity-event;1",
   "nsIActivityEvent",
   "init"
 );
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
--- a/mail/components/activity/modules/sendLater.jsm
+++ b/mail/components/activity/modules/sendLater.jsm
@@ -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/. */
 
-this.EXPORTED_SYMBOLS = ["sendLaterModule"];
+const EXPORTED_SYMBOLS = ["sendLaterModule"];
 
 var nsActProcess = Components.Constructor(
   "@mozilla.org/activity-process;1",
   "nsIActivityProcess",
   "init"
 );
 var nsActEvent = Components.Constructor(
   "@mozilla.org/activity-event;1",
--- a/mail/components/cloudfile/cloudFileAccounts.jsm
+++ b/mail/components/cloudfile/cloudFileAccounts.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["cloudFileAccounts"];
+const EXPORTED_SYMBOLS = ["cloudFileAccounts"];
 
 var ACCOUNT_ROOT = "mail.cloud_files.accounts.";
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var { EventEmitter } = ChromeUtils.import(
   "resource://gre/modules/EventEmitter.jsm"
 );
 
--- a/mail/components/customizableui/CustomizableUI.jsm
+++ b/mail/components/customizableui/CustomizableUI.jsm
@@ -4447,18 +4447,18 @@ var CustomizableUI = {
 
     parent.appendChild(aSubview);
   },
 
   getCustomizationTarget(aElement) {
     return CustomizableUIInternal.getCustomizationTarget(aElement);
   },
 };
-Object.freeze(this.CustomizableUI);
-Object.freeze(this.CustomizableUI.windows);
+Object.freeze(CustomizableUI);
+Object.freeze(CustomizableUI.windows);
 
 /**
  * All external consumers of widgets are really interacting with these wrappers
  * which provide a common interface.
  */
 
 /**
  * WidgetGroupWrapper is the common interface for interacting with an entire
--- a/mail/components/enterprisepolicies/schemas/schema.jsm
+++ b/mail/components/enterprisepolicies/schemas/schema.jsm
@@ -1,10 +1,10 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["schema"];
+const EXPORTED_SYMBOLS = ["schema"];
 
-this.schema =
+var schema =
 #include policies-schema.json
--- a/mail/components/extensions/ExtensionToolbarButtons.jsm
+++ b/mail/components/extensions/ExtensionToolbarButtons.jsm
@@ -1,13 +1,13 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["ToolbarButtonAPI"];
+const EXPORTED_SYMBOLS = ["ToolbarButtonAPI"];
 
 ChromeUtils.defineModuleGetter(
   this,
   "Services",
   "resource://gre/modules/Services.jsm"
 );
 ChromeUtils.defineModuleGetter(
   this,
--- a/mail/components/im/modules/chatHandler.jsm
+++ b/mail/components/im/modules/chatHandler.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["allContacts", "onlineContacts", "ChatCore"];
+const EXPORTED_SYMBOLS = ["allContacts", "onlineContacts", "ChatCore"];
 
 const { Services } = ChromeUtils.import("resource:///modules/imServices.jsm");
 const { fixIterator } = ChromeUtils.import(
   "resource:///modules/iteratorUtils.jsm"
 );
 const { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
--- a/mail/components/im/modules/chatNotifications.jsm
+++ b/mail/components/im/modules/chatNotifications.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["Notifications"];
+const EXPORTED_SYMBOLS = ["Notifications"];
 
 const { Services } = ChromeUtils.import("resource:///modules/imServices.jsm");
 const { StringBundle } = ChromeUtils.import(
   "resource:///modules/StringBundle.jsm"
 );
 const { AppConstants } = ChromeUtils.import(
   "resource://gre/modules/AppConstants.jsm"
 );
--- a/mail/components/im/modules/index_im.jsm
+++ b/mail/components/im/modules/index_im.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = [];
+const EXPORTED_SYMBOLS = [];
 
 var CC = Components.Constructor;
 
 const { Gloda } = ChromeUtils.import(
   "resource:///modules/gloda/GlodaPublic.jsm"
 );
 const { GlodaAccount } = ChromeUtils.import(
   "resource:///modules/gloda/GlodaDataModel.jsm"
@@ -273,17 +273,17 @@ Gloda.defineAttribute({
   subjectNouns: [IMConversationNoun.id],
   objectNoun: Gloda.NOUN_FULLTEXT,
   canQuery: true,
 });
 
 // -- fulltext search helper
 // fulltextMatches.  Match over message subject, body, and attachments
 // @testpoint gloda.noun.message.attr.fulltextMatches
-this._attrFulltext = Gloda.defineAttribute({
+Gloda.defineAttribute({
   provider: WidgetProvider,
   extensionName: EXT_NAME,
   attributeType: Gloda.kAttrDerived,
   attributeName: "fulltextMatches",
   singular: true,
   special: Gloda.kSpecialFulltext,
   specialColumnName: "imConversationsText",
   subjectNouns: [IMConversationNoun.id],
--- a/mail/components/im/modules/search_im.jsm
+++ b/mail/components/im/modules/search_im.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-this.EXPORTED_SYMBOLS = ["GlodaIMSearcher"];
+const EXPORTED_SYMBOLS = ["GlodaIMSearcher"];
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { Gloda } = ChromeUtils.import(
   "resource:///modules/gloda/GlodaPublic.jsm"
 );
 
 /**
  * How much time boost should a 'score point' amount to?  The authoritative,
--- a/mail/extensions/openpgp/content/modules/rnp.jsm
+++ b/mail/extensions/openpgp/content/modules/rnp.jsm
@@ -906,9 +906,9 @@ var RNP = {
     
     return result;
   },
 
 };
 
 // exports
 
-this.EXPORTED_SYMBOLS = ["RNP"];
+const EXPORTED_SYMBOLS = ["RNP"];
--- a/mail/extensions/openpgp/content/modules/rnpLib.jsm
+++ b/mail/extensions/openpgp/content/modules/rnpLib.jsm
@@ -851,9 +851,9 @@ function enableRNPLibJS() {
     
     RNP_KEY_REMOVE_SECRET: 2,
 
   };
 }
 
 // exports
 
-this.EXPORTED_SYMBOLS = ["RNPLibLoader"];
+const EXPORTED_SYMBOLS = ["RNPLibLoader"];
--- a/mail/extensions/openpgp/content/modules/windows.jsm
+++ b/mail/extensions/openpgp/content/modules/windows.jsm
@@ -1,17 +1,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 https://mozilla.org/MPL/2.0/.
  */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = ["EnigmailWindows"];
+const EXPORTED_SYMBOLS = ["EnigmailWindows"];
 
 const EnigmailLog = ChromeUtils.import("chrome://openpgp/content/modules/log.jsm").EnigmailLog;
 const EnigmailCore = ChromeUtils.import("chrome://openpgp/content/modules/core.jsm").EnigmailCore;
 const EnigmailLocale = ChromeUtils.import("chrome://openpgp/content/modules/locale.jsm").EnigmailLocale;
 const EnigmailKeyRing = ChromeUtils.import("chrome://openpgp/content/modules/keyRing.jsm").EnigmailKeyRing;
 const EnigmailRules = ChromeUtils.import("chrome://openpgp/content/modules/rules.jsm").EnigmailRules;
 const EnigmailApp = ChromeUtils.import("chrome://openpgp/content/modules/app.jsm").EnigmailApp;
 const EnigmailCompat = ChromeUtils.import("chrome://openpgp/content/modules/compat.jsm").EnigmailCompat;
--- a/mail/test/browser/shared-modules/AccountManagerHelpers.jsm
+++ b/mail/test/browser/shared-modules/AccountManagerHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "open_advanced_settings",
   "open_mail_account_setup_wizard",
   "click_account_tree_row",
   "get_account_tree_row",
   "remove_account",
 ];
 
 var elib = ChromeUtils.import(
--- a/mail/test/browser/shared-modules/AddressBookHelpers.jsm
+++ b/mail/test/browser/shared-modules/AddressBookHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "ensure_card_exists",
   "ensure_no_card_exists",
   "open_address_book_window",
   "close_address_book_window",
   "create_address_book",
   "create_ldap_address_book",
   "create_contact",
   "create_mailing_list",
--- a/mail/test/browser/shared-modules/AttachmentHelpers.jsm
+++ b/mail/test/browser/shared-modules/AttachmentHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "create_body_part",
   "create_deleted_attachment",
   "create_detached_attachment",
   "create_enclosure_attachment",
   "gMockFilePicker",
   "gMockFilePickReg",
   "select_attachments",
 ];
--- a/mail/test/browser/shared-modules/CloudfileHelpers.jsm
+++ b/mail/test/browser/shared-modules/CloudfileHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "gMockCloudfileManager",
   "MockCloudfileAccount",
   "getFile",
   "collectFiles",
 ];
 
 var os = ChromeUtils.import("resource://testing-common/mozmill/os.jsm");
 
--- a/mail/test/browser/shared-modules/ComposeHelpers.jsm
+++ b/mail/test/browser/shared-modules/ComposeHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "open_compose_new_mail",
   "open_compose_with_reply",
   "open_compose_with_reply_to_all",
   "open_compose_with_reply_to_list",
   "open_compose_with_forward",
   "open_compose_with_forward_as_attachments",
   "open_compose_with_edit_as_new",
   "open_compose_with_element_click",
--- a/mail/test/browser/shared-modules/ContentTabHelpers.jsm
+++ b/mail/test/browser/shared-modules/ContentTabHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "open_content_tab_with_url",
   "open_content_tab_with_click",
   "plan_for_content_tab_load",
   "wait_for_content_tab_load",
   "assert_content_tab_has_url",
   "assert_content_tab_has_favicon",
   "content_tab_e",
   "content_tab_eid",
--- a/mail/test/browser/shared-modules/CustomizationHelpers.jsm
+++ b/mail/test/browser/shared-modules/CustomizationHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["CustomizeDialogHelper"];
+const EXPORTED_SYMBOLS = ["CustomizeDialogHelper"];
 
 var elib = ChromeUtils.import(
   "resource://testing-common/mozmill/elementslib.jsm"
 );
 
 var fdh = ChromeUtils.import(
   "resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
 );
--- a/mail/test/browser/shared-modules/DOMHelpers.jsm
+++ b/mail/test/browser/shared-modules/DOMHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "assert_element_visible",
   "element_visible_recursive",
   "assert_element_not_visible",
   "wait_for_element",
   "assert_next_nodes",
   "assert_previous_nodes",
   "wait_for_element_enabled",
   "check_element_visible",
--- a/mail/test/browser/shared-modules/FolderDisplayHelpers.jsm
+++ b/mail/test/browser/shared-modules/FolderDisplayHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "add_message_to_folder",
   "add_sets_to_folders",
   "add_to_toolbar",
   "archive_messages",
   "archive_selected_messages",
   "assert_attachment_list_focused",
   "assert_collapsed",
   "assert_default_window_size",
--- a/mail/test/browser/shared-modules/JunkHelpers.jsm
+++ b/mail/test/browser/shared-modules/JunkHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "mark_selected_messages_as_junk",
   "delete_mail_marked_as_junk",
 ];
 
 var elib = ChromeUtils.import(
   "resource://testing-common/mozmill/elementslib.jsm"
 );
 var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
--- a/mail/test/browser/shared-modules/KeyboardHelpers.jsm
+++ b/mail/test/browser/shared-modules/KeyboardHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "input_value",
   "delete_existing",
   "delete_all_existing",
 ];
 
 /**
  * Emulates manual input
  *
--- a/mail/test/browser/shared-modules/MessageHelpers.jsm
+++ b/mail/test/browser/shared-modules/MessageHelpers.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Helpers to deal with message (nsIMsgDBHdr) parsing.
  */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["to_mime_message"];
+const EXPORTED_SYMBOLS = ["to_mime_message"];
 
 var frame = ChromeUtils.import("resource://testing-common/mozmill/frame.jsm");
 var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
 
 var { MsgHdrToMimeMessage } = ChromeUtils.import(
   "resource:///modules/gloda/MimeMessage.jsm"
 );
 
--- a/mail/test/browser/shared-modules/MockObjectHelpers.jsm
+++ b/mail/test/browser/shared-modules/MockObjectHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["MockObjectReplacer", "MockObjectRegisterer"];
+const EXPORTED_SYMBOLS = ["MockObjectReplacer", "MockObjectRegisterer"];
 
 var Cm = Components.manager;
 
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 XPCOMUtils.defineLazyServiceGetter(
   this,
--- a/mail/test/browser/shared-modules/MouseEventHelpers.jsm
+++ b/mail/test/browser/shared-modules/MouseEventHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "drag_n_drop_element",
   "synthesize_drag_start",
   "synthesize_drag_over",
   "synthesize_drag_end",
   "synthesize_drop",
 ];
 
 var EventUtils = ChromeUtils.import(
--- a/mail/test/browser/shared-modules/NNTPHelpers.jsm
+++ b/mail/test/browser/shared-modules/NNTPHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "setupNNTPDaemon",
   "NNTP_PORT",
   "setupLocalServer",
   "startupNNTPServer",
   "shutdownNNTPServer",
 ];
 
 var folderDisplayHelper = ChromeUtils.import(
--- a/mail/test/browser/shared-modules/NewMailAccountHelpers.jsm
+++ b/mail/test/browser/shared-modules/NewMailAccountHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "wait_for_provider_list_loaded",
   "wait_for_search_ready",
   "open_provisioner_window",
   "wait_for_the_wizard_to_be_closed",
   "assert_links_shown",
   "assert_links_not_shown",
   "wait_for_search_results",
   "gConsoleListener",
--- a/mail/test/browser/shared-modules/NotificationBoxHelpers.jsm
+++ b/mail/test/browser/shared-modules/NotificationBoxHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "check_notification_displayed",
   "assert_notification_displayed",
   "close_notification",
   "wait_for_notification_to_stop",
   "wait_for_notification_to_show",
   "get_notification_button",
 ];
 
--- a/mail/test/browser/shared-modules/PrefTabHelpers.jsm
+++ b/mail/test/browser/shared-modules/PrefTabHelpers.jsm
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Helpers to deal with the preferences tab.
  */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = ["close_pref_tab", "open_pref_tab"];
+const EXPORTED_SYMBOLS = ["close_pref_tab", "open_pref_tab"];
 
 var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
 
 var fdh = ChromeUtils.import(
   "resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
 );
 var cth = ChromeUtils.import(
   "resource://testing-common/mozmill/ContentTabHelpers.jsm"
--- a/mail/test/browser/shared-modules/PromptHelpers.jsm
+++ b/mail/test/browser/shared-modules/PromptHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "gMockPromptService",
   "gMockAuthPromptReg",
   "gMockAuthPrompt",
 ];
 
 var { MockObjectReplacer } = ChromeUtils.import(
   "resource://testing-common/mozmill/MockObjectHelpers.jsm"
 );
--- a/mail/test/browser/shared-modules/QuickFilterBarHelpers.jsm
+++ b/mail/test/browser/shared-modules/QuickFilterBarHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "assert_quick_filter_button_enabled",
   "assert_quick_filter_bar_visible",
   "toggle_quick_filter_bar",
   "assert_constraints_expressed",
   "toggle_boolean_constraints",
   "toggle_tag_constraints",
   "toggle_tag_mode",
   "assert_tag_constraints_visible",
--- a/mail/test/browser/shared-modules/SearchWindowHelpers.jsm
+++ b/mail/test/browser/shared-modules/SearchWindowHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "open_search_window",
   "open_search_window_from_context_menu",
   "close_search_window",
   "assert_search_window_folder_displayed",
 ];
 
 var folderDisplayHelper = ChromeUtils.import(
   "resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
--- a/mail/test/browser/shared-modules/SubscribeWindowHelpers.jsm
+++ b/mail/test/browser/shared-modules/SubscribeWindowHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "open_subscribe_window_from_context_menu",
   "enter_text_in_search_box",
   "check_newsgroup_displayed",
 ];
 
 var folderDisplayHelper = ChromeUtils.import(
   "resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
 );
--- a/mail/test/browser/shared-modules/WindowHelpers.jsm
+++ b/mail/test/browser/shared-modules/WindowHelpers.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   // These are used by test-folder-display-helpers.js and shouldn't really be
   // exported, but it's convenient right now.
   "captureWindowStatesForErrorReporting",
   "getWindowTypeForAppWindow",
   "hereIsMarkAction",
 
   "plan_for_new_window",
   "wait_for_new_window",
--- a/mail/test/browser/shared-modules/httpd.jsm
+++ b/mail/test/browser/shared-modules/httpd.jsm
@@ -3,17 +3,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/. */
 
 /*
  * An implementation of an HTTP server.
  */
 
-this.EXPORTED_SYMBOLS = [
+const EXPORTED_SYMBOLS = [
   "HTTP_400",
   "HTTP_401",
   "HTTP_402",
   "HTTP_403",
   "HTTP_404",
   "HTTP_405",
   "HTTP_406",
   "HTTP_407",