Bug 1478308 - Remove unnecessary ChromeUtils.imports in toolkit/ r?mikedeboer draft
authorMark Banner <standard8@mozilla.com>
Wed, 25 Jul 2018 11:00:35 +0100
changeset 822903 cfd83dcffed2a85e2ae4015ef63147a4ea3b8bab
parent 822902 fa0930a519b395b3628bd76a5f847dfe6844f14e
child 822904 f24b37ee153f41b25fcf9e880f356a96425a12e0
push id117516
push userbmo:standard8@mozilla.com
push dateThu, 26 Jul 2018 10:20:32 +0000
reviewersmikedeboer
bugs1478308
milestone63.0a1
Bug 1478308 - Remove unnecessary ChromeUtils.imports in toolkit/ r?mikedeboer MozReview-Commit-ID: 45Tfs2ZZ06r
toolkit/components/contentprefs/ContentPrefServiceChild.jsm
toolkit/components/contentprefs/ContentPrefUtils.jsm
toolkit/components/crashmonitor/CrashMonitor.jsm
toolkit/components/downloads/DownloadList.jsm
toolkit/components/downloads/Downloads.jsm
toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm
toolkit/components/extensions/ExtensionPreferencesManager.jsm
toolkit/components/extensions/ExtensionSettingsStore.jsm
toolkit/components/extensions/LegacyExtensionsUtils.jsm
toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
toolkit/components/extensions/test/xpcshell/test_ext_debugging_utils.js
toolkit/components/extensions/test/xpcshell/test_ext_downloads_private.js
toolkit/components/extensions/test/xpcshell/test_ext_legacy_extension_context.js
toolkit/components/extensions/test/xpcshell/test_ext_native_messaging_perf.js
toolkit/components/extensions/test/xpcshell/test_ext_proxy_settings.js
toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
toolkit/components/extensions/test/xpcshell/test_proxy_listener.js
toolkit/components/extensions/test/xpcshell/test_proxy_scripts.js
toolkit/components/extensions/test/xpcshell/test_proxy_scripts_results.js
toolkit/components/narrate/Narrator.jsm
toolkit/components/normandy/Normandy.jsm
toolkit/components/normandy/actions/PreferenceRollbackAction.jsm
toolkit/components/normandy/lib/ActionSandboxManager.jsm
toolkit/components/normandy/lib/Addons.jsm
toolkit/components/normandy/lib/CleanupManager.jsm
toolkit/components/normandy/lib/ClientEnvironment.jsm
toolkit/components/normandy/lib/NormandyDriver.jsm
toolkit/components/normandy/lib/PreferenceExperiments.jsm
toolkit/components/normandy/lib/PreferenceRollouts.jsm
toolkit/components/normandy/lib/SandboxManager.jsm
toolkit/components/normandy/lib/ShieldPreferences.jsm
toolkit/components/normandy/lib/TelemetryEvents.jsm
toolkit/components/normandy/lib/Uptake.jsm
toolkit/components/osfile/modules/osfile_async_front.jsm
toolkit/components/perfmonitoring/PerformanceStats.jsm
toolkit/components/places/BookmarkJSONUtils.jsm
toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
toolkit/components/places/tests/PlacesTestUtils.jsm
toolkit/components/promiseworker/PromiseWorker.jsm
toolkit/components/prompts/src/CommonDialog.jsm
toolkit/components/reader/AboutReader.jsm
toolkit/components/resistfingerprinting/LanguagePrompt.jsm
toolkit/components/satchel/AutoCompletePopup.jsm
toolkit/components/satchel/nsFormAutoCompleteResult.jsm
toolkit/components/satchel/nsInputListAutoComplete.js
toolkit/components/telemetry/TelemetryArchive.jsm
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/TelemetryHealthPing.jsm
toolkit/components/telemetry/TelemetryReportingPolicy.jsm
toolkit/components/telemetry/TelemetryStopwatch.jsm
toolkit/components/telemetry/UpdatePing.jsm
toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
toolkit/components/thumbnails/PageThumbUtils.jsm
toolkit/components/utils/JsonSchemaValidator.jsm
toolkit/components/viewsource/ViewSourceBrowser.jsm
toolkit/crashreporter/KeyValueParser.jsm
toolkit/forgetaboutsite/ForgetAboutSite.jsm
toolkit/modules/AutoScrollController.jsm
toolkit/modules/Battery.jsm
toolkit/modules/BrowserUtils.jsm
toolkit/modules/CanonicalJSON.jsm
toolkit/modules/Console.jsm
toolkit/modules/DateTimePickerParent.jsm
toolkit/modules/DeferredTask.jsm
toolkit/modules/EventEmitter.jsm
toolkit/modules/FinderIterator.jsm
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/HiddenFrame.jsm
toolkit/modules/LightweightThemeConsumer.jsm
toolkit/modules/ObjectUtils.jsm
toolkit/modules/PermissionsUtils.jsm
toolkit/modules/Preferences.jsm
toolkit/modules/PrintingContent.jsm
toolkit/modules/RemotePageManager.jsm
toolkit/modules/RemoteSecurityUI.jsm
toolkit/modules/RemoteWebProgress.jsm
toolkit/modules/Timer.jsm
toolkit/modules/WebChannel.jsm
toolkit/modules/ZipUtils.jsm
toolkit/modules/addons/MatchURLFilters.jsm
toolkit/modules/addons/WebNavigation.jsm
toolkit/modules/sessionstore/FormData.jsm
toolkit/modules/sessionstore/PrivacyFilter.jsm
toolkit/modules/subprocess/.eslintrc.js
toolkit/modules/subprocess/Subprocess.jsm
toolkit/modules/subprocess/subprocess_common.jsm
toolkit/modules/subprocess/subprocess_unix.jsm
toolkit/modules/subprocess/subprocess_win.jsm
toolkit/modules/tests/modules/MockDocument.jsm
toolkit/mozapps/downloads/DownloadLastDir.jsm
toolkit/mozapps/downloads/DownloadUtils.jsm
toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
toolkit/mozapps/update/UpdateListener.jsm
--- a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm
+++ b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm
@@ -2,20 +2,18 @@
 /* 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 = [ "ContentPrefServiceChild" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/ContentPrefUtils.jsm");
-ChromeUtils.import("resource://gre/modules/ContentPrefStore.jsm");
 
 // We only need one bit of information out of the context.
 function contextArg(context) {
   return (context && context.usePrivateBrowsing) ?
             { usePrivateBrowsing: true } :
             null;
 }
 
--- a/toolkit/components/contentprefs/ContentPrefUtils.jsm
+++ b/toolkit/components/contentprefs/ContentPrefUtils.jsm
@@ -9,19 +9,16 @@ var EXPORTED_SYMBOLS = [
   "ContentPref",
   "cbHandleResult",
   "cbHandleError",
   "cbHandleCompletion",
   "safeCallback",
   "_methodsCallableFromChild",
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
 function ContentPref(domain, name, value) {
   this.domain = domain;
   this.name = name;
   this.value = value;
 }
 
 ContentPref.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPref]),
--- a/toolkit/components/crashmonitor/CrashMonitor.jsm
+++ b/toolkit/components/crashmonitor/CrashMonitor.jsm
@@ -31,17 +31,16 @@
  * does not necessarily tell us that the checkpoint wasn't reached.
  */
 
 var EXPORTED_SYMBOLS = [ "CrashMonitor" ];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
-ChromeUtils.import("resource://gre/modules/AsyncShutdown.jsm");
 
 const NOTIFICATIONS = [
   "final-ui-startup",
   "sessionstore-windows-restored",
   "quit-application-granted",
   "quit-application",
   "profile-change-net-teardown",
   "profile-change-teardown",
--- a/toolkit/components/downloads/DownloadList.jsm
+++ b/toolkit/components/downloads/DownloadList.jsm
@@ -9,18 +9,16 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "DownloadList",
   "DownloadCombinedList",
   "DownloadSummary",
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 /**
  * Represents a collection of Download objects that can be viewed and managed by
  * the user interface, and persisted across sessions.
  */
 var DownloadList = function() {
   this._downloads = [];
   this._views = new Set();
 };
--- a/toolkit/components/downloads/Downloads.jsm
+++ b/toolkit/components/downloads/Downloads.jsm
@@ -8,17 +8,16 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "Downloads",
 ];
 
 ChromeUtils.import("resource://gre/modules/Integration.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/DownloadCore.jsm");
 
 ChromeUtils.defineModuleGetter(this, "DownloadCombinedList",
                                "resource://gre/modules/DownloadList.jsm");
 ChromeUtils.defineModuleGetter(this, "DownloadList",
                                "resource://gre/modules/DownloadList.jsm");
 ChromeUtils.defineModuleGetter(this, "DownloadSummary",
                                "resource://gre/modules/DownloadList.jsm");
--- a/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm
+++ b/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm
@@ -10,17 +10,16 @@
  * This module contains utilities for interacting with DevTools
  * from the child process.
  */
 
 var EXPORTED_SYMBOLS = ["ExtensionChildDevToolsUtils"];
 
 ChromeUtils.import("resource://gre/modules/EventEmitter.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // Create a variable to hold the cached ThemeChangeObserver which does not
 // get created until a devtools context has been created.
 let themeChangeObserver;
 
 /**
  * An observer that watches for changes to the devtools theme and provides
  * that information to the devtools.panels.themeName API property, as well as
--- a/toolkit/components/extensions/ExtensionPreferencesManager.jsm
+++ b/toolkit/components/extensions/ExtensionPreferencesManager.jsm
@@ -20,17 +20,16 @@
  *              values that correspond to the prefs to be set.
  */
 
 var EXPORTED_SYMBOLS = ["ExtensionPreferencesManager"];
 
 const {Management} = ChromeUtils.import("resource://gre/modules/Extension.jsm", {});
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "ExtensionSettingsStore",
                                "resource://gre/modules/ExtensionSettingsStore.jsm");
 ChromeUtils.defineModuleGetter(this, "Preferences",
                                "resource://gre/modules/Preferences.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "defaultPreferences", function() {
   return new Preferences({defaultBranch: true});
--- a/toolkit/components/extensions/ExtensionSettingsStore.jsm
+++ b/toolkit/components/extensions/ExtensionSettingsStore.jsm
@@ -39,17 +39,16 @@
  * }
  *
  */
 
 var EXPORTED_SYMBOLS = ["ExtensionSettingsStore"];
 
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "AddonManager",
                                "resource://gre/modules/AddonManager.jsm");
 ChromeUtils.defineModuleGetter(this, "JSONFile",
                                "resource://gre/modules/JSONFile.jsm");
 
 const JSON_FILE_NAME = "extension-settings.json";
 const JSON_FILE_VERSION = 2;
--- a/toolkit/components/extensions/LegacyExtensionsUtils.jsm
+++ b/toolkit/components/extensions/LegacyExtensionsUtils.jsm
@@ -9,18 +9,16 @@ var EXPORTED_SYMBOLS = ["LegacyExtension
 
 /* exported LegacyExtensionsUtils, LegacyExtensionContext */
 
 /**
  * This file exports helpers for Legacy Extensions that want to embed a webextensions
  * and exchange messages with the embedded WebExtension.
  */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Extension",
                                "resource://gre/modules/Extension.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionChild",
                                "resource://gre/modules/ExtensionChild.jsm");
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 
 ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
@@ -64,17 +64,16 @@ add_task(async function test_webRequest_
   // extension does not return anything in the authRequred call.  We should
   // get the call in the extension first, then in the chrome code where we
   // cancel the request to avoid dealing with the prompt dialog here.  The test
   // is to ensure that WebRequest calls the previous notificationCallbacks
   // if the authorization is not handled by the onAuthRequired handler.
 
   let chromeScript = SpecialPowers.loadChromeScript(() => {
     ChromeUtils.import("resource://gre/modules/Services.jsm");
-    ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
     let observer = channel => {
       if (!(channel instanceof Ci.nsIHttpChannel && channel.URI.host === "mochi.test")) {
         return;
       }
       Services.obs.removeObserver(observer, "http-on-modify-request");
       channel.notificationCallbacks = {
         QueryInterface: ChromeUtils.generateQI([Ci.nsIInterfaceRequestor,
--- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
@@ -1,12 +1,10 @@
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-
 // ExtensionContent.jsm needs to know when it's running from xpcshell,
 // to use the right timeout for content scripts executed at document_idle.
 ExtensionTestUtils.mockAppInfo();
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
@@ -1,11 +1,10 @@
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
 
 const {
   // cookieBehavior constants.
   BEHAVIOR_REJECT_FOREIGN,
   BEHAVIOR_REJECT,
   BEHAVIOR_LIMIT_FOREIGN,
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_debugging_utils.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_debugging_utils.js
@@ -1,14 +1,13 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 add_task(async function testExtensionDebuggingUtilsCleanup() {
   const extension = ExtensionTestUtils.loadExtension({
     background() {
       browser.test.sendMessage("background.ready");
     },
   });
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_downloads_private.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_downloads_private.js
@@ -1,14 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/Downloads.jsm");
-
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE = `http://localhost:${server.identity.primaryPort}/data`;
 const TXT_FILE = "file_download.txt";
 const TXT_URL = BASE + "/" + TXT_FILE;
 
 function setup() {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_legacy_extension_context.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_legacy_extension_context.js
@@ -1,14 +1,13 @@
 "use strict";
 
 /* globals browser */
 
 ChromeUtils.import("resource://gre/modules/Extension.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const {LegacyExtensionContext} = ChromeUtils.import("resource://gre/modules/LegacyExtensionsUtils.jsm", {});
 
 /**
  * This test case ensures that LegacyExtensionContext instances:
  *  - expose the expected API object and can join the messaging
  *    of a webextension given its addon id
  *  - the exposed API object can receive a port related to a `runtime.connect`
--- a/toolkit/components/extensions/test/xpcshell/test_ext_native_messaging_perf.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_native_messaging_perf.js
@@ -1,14 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/Subprocess.jsm");
-
 const MAX_ROUND_TRIP_TIME_MS = AppConstants.DEBUG || AppConstants.ASAN ? 60 : 30;
 const MAX_RETRIES = 5;
 
 
 const ECHO_BODY = String.raw`
   import struct
   import sys
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_proxy_settings.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_proxy_settings.js
@@ -1,11 +1,10 @@
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/ExtensionUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "HttpServer",
                                "resource://testing-common/httpd.js");
 
 const {
   createAppInfo,
   promiseShutdownManager,
   promiseStartupManager,
 } = AddonTestUtils;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
@@ -1,12 +1,11 @@
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Schemas.jsm");
-ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
 ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
 
 let {LocalAPIImplementation, SchemaAPIInterface} = ExtensionCommon;
 
 const global = this;
 
 let json = [
   {
--- a/toolkit/components/extensions/test/xpcshell/test_proxy_listener.js
+++ b/toolkit/components/extensions/test/xpcshell/test_proxy_listener.js
@@ -1,12 +1,11 @@
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Extension.jsm");
-ChromeUtils.import("resource://gre/modules/ProxyScriptContext.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gProxyService",
                                    "@mozilla.org/network/protocol-proxy-service;1",
                                    "nsIProtocolProxyService");
 
 const TRANSPARENT_PROXY_RESOLVES_HOST = Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST;
 
 function getProxyInfo() {
--- a/toolkit/components/extensions/test/xpcshell/test_proxy_scripts.js
+++ b/toolkit/components/extensions/test/xpcshell/test_proxy_scripts.js
@@ -1,14 +1,13 @@
 "use strict";
 
 /* eslint no-unused-vars: ["error", {"args": "none", "varsIgnorePattern": "^(FindProxyForURL)$"}] */
 
 ChromeUtils.import("resource://gre/modules/Extension.jsm");
-ChromeUtils.import("resource://gre/modules/ProxyScriptContext.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gProxyService",
                                    "@mozilla.org/network/protocol-proxy-service;1",
                                    "nsIProtocolProxyService");
 
 function getProxyInfo() {
   return new Promise((resolve, reject) => {
     let channel = NetUtil.newChannel({
--- a/toolkit/components/extensions/test/xpcshell/test_proxy_scripts_results.js
+++ b/toolkit/components/extensions/test/xpcshell/test_proxy_scripts_results.js
@@ -1,14 +1,13 @@
 "use strict";
 
 /* eslint no-unused-vars: ["error", {"args": "none", "varsIgnorePattern": "^(FindProxyForURL)$"}] */
 
 ChromeUtils.import("resource://gre/modules/Extension.jsm");
-ChromeUtils.import("resource://gre/modules/ProxyScriptContext.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gProxyService",
                                    "@mozilla.org/network/protocol-proxy-service;1",
                                    "nsIProtocolProxyService");
 
 const TRANSPARENT_PROXY_RESOLVES_HOST = Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST;
 
 let extension;
--- a/toolkit/components/narrate/Narrator.jsm
+++ b/toolkit/components/narrate/Narrator.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 
 var EXPORTED_SYMBOLS = [ "Narrator" ];
 
 // Maximum time into paragraph when pressing "skip previous" will go
 // to previous paragraph and not the start of current one.
 const PREV_THRESHOLD = 2000;
--- a/toolkit/components/normandy/Normandy.jsm
+++ b/toolkit/components/normandy/Normandy.jsm
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/Log.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AboutPages: "resource://normandy-content/AboutPages.jsm",
   AddonStudies: "resource://normandy/lib/AddonStudies.jsm",
   CleanupManager: "resource://normandy/lib/CleanupManager.jsm",
--- a/toolkit/components/normandy/actions/PreferenceRollbackAction.jsm
+++ b/toolkit/components/normandy/actions/PreferenceRollbackAction.jsm
@@ -1,16 +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";
 
 ChromeUtils.import("resource://normandy/actions/BaseAction.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryEnvironment", "resource://gre/modules/TelemetryEnvironment.jsm");
 ChromeUtils.defineModuleGetter(this, "PreferenceRollouts", "resource://normandy/lib/PreferenceRollouts.jsm");
 ChromeUtils.defineModuleGetter(this, "PrefUtils", "resource://normandy/lib/PrefUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "ActionSchemas", "resource://normandy/actions/schemas/index.js");
 ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://normandy/lib/TelemetryEvents.jsm");
 
 var EXPORTED_SYMBOLS = ["PreferenceRollbackAction"];
 
--- a/toolkit/components/normandy/lib/ActionSandboxManager.jsm
+++ b/toolkit/components/normandy/lib/ActionSandboxManager.jsm
@@ -1,17 +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/. */
 
 "use strict";
 
 ChromeUtils.import("resource://normandy/lib/NormandyDriver.jsm");
 ChromeUtils.import("resource://normandy/lib/SandboxManager.jsm");
-ChromeUtils.import("resource://normandy/lib/LogManager.jsm");
 
 var EXPORTED_SYMBOLS = ["ActionSandboxManager"];
 
 /**
  * An extension to SandboxManager that prepares a sandbox for executing
  * Normandy actions.
  *
  * Actions register a set of named callbacks, which this class makes available
--- a/toolkit/components/normandy/lib/Addons.jsm
+++ b/toolkit/components/normandy/lib/Addons.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
 
 var EXPORTED_SYMBOLS = ["Addons"];
 
 /**
  * SafeAddons store info about an add-on. They are single-depth
  * objects to simplify cloning, and have no methods so they are safe
  * to pass to sandboxes and filter expressions.
--- a/toolkit/components/normandy/lib/CleanupManager.jsm
+++ b/toolkit/components/normandy/lib/CleanupManager.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm");
 
 var EXPORTED_SYMBOLS = ["CleanupManager"];
 
 class CleanupManagerClass {
   constructor() {
     this.handlers = new Set();
     this.cleanupPromise = null;
--- a/toolkit/components/normandy/lib/ClientEnvironment.jsm
+++ b/toolkit/components/normandy/lib/ClientEnvironment.jsm
@@ -1,16 +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";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "NormandyApi", "resource://normandy/lib/NormandyApi.jsm");
 ChromeUtils.defineModuleGetter(
   this,
   "ClientEnvironmentBase",
   "resource://gre/modules/components-utils/ClientEnvironment.jsm"
 );
 ChromeUtils.defineModuleGetter(
--- a/toolkit/components/normandy/lib/NormandyDriver.jsm
+++ b/toolkit/components/normandy/lib/NormandyDriver.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/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 ChromeUtils.import("resource:///modules/ShellService.jsm");
 ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 ChromeUtils.import("resource://normandy/lib/Addons.jsm");
 ChromeUtils.import("resource://normandy/lib/LogManager.jsm");
 ChromeUtils.import("resource://normandy/lib/Storage.jsm");
--- a/toolkit/components/normandy/lib/PreferenceExperiments.jsm
+++ b/toolkit/components/normandy/lib/PreferenceExperiments.jsm
@@ -47,18 +47,16 @@
  *   for the preference is modified when the experiment starts, and is reset to
  *   its original value when the experiment ends.
  * @property {string} experimentType
  *   The type to report to Telemetry's experiment marker API.
  */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "CleanupManager", "resource://normandy/lib/CleanupManager.jsm");
 ChromeUtils.defineModuleGetter(this, "JSONFile", "resource://gre/modules/JSONFile.jsm");
 ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 ChromeUtils.defineModuleGetter(this, "LogManager", "resource://normandy/lib/LogManager.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryEnvironment", "resource://gre/modules/TelemetryEnvironment.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://normandy/lib/TelemetryEvents.jsm");
 
--- a/toolkit/components/normandy/lib/PreferenceRollouts.jsm
+++ b/toolkit/components/normandy/lib/PreferenceRollouts.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/. */
 
 "use strict";
 
-ChromeUtils.import("resource://normandy/actions/BaseAction.jsm");
 ChromeUtils.import("resource://normandy/lib/LogManager.jsm");
 ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "IndexedDB", "resource://gre/modules/IndexedDB.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryEnvironment", "resource://gre/modules/TelemetryEnvironment.jsm");
 ChromeUtils.defineModuleGetter(this, "PrefUtils", "resource://normandy/lib/PrefUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://normandy/lib/TelemetryEvents.jsm");
 
 const log = LogManager.getLogger("recipe-runner");
--- a/toolkit/components/normandy/lib/SandboxManager.jsm
+++ b/toolkit/components/normandy/lib/SandboxManager.jsm
@@ -1,10 +1,8 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
 var EXPORTED_SYMBOLS = ["SandboxManager"];
 
 /**
  * A wrapper class with helper methods for manipulating a sandbox.
  *
  * Along with convenient utility methods, SandboxManagers maintain a list of
  * "holds", which prevent the sandbox from being nuked until all registered
  * holds are removed. This allows sandboxes to trigger async operations and
--- a/toolkit/components/normandy/lib/ShieldPreferences.jsm
+++ b/toolkit/components/normandy/lib/ShieldPreferences.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/. */
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(
   this, "AddonStudies", "resource://normandy/lib/AddonStudies.jsm"
 );
 ChromeUtils.defineModuleGetter(
   this, "CleanupManager", "resource://normandy/lib/CleanupManager.jsm"
 );
 
--- a/toolkit/components/normandy/lib/TelemetryEvents.jsm
+++ b/toolkit/components/normandy/lib/TelemetryEvents.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/. */
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var EXPORTED_SYMBOLS = ["TelemetryEvents"];
 
 const TELEMETRY_CATEGORY = "normandy";
 
 const TelemetryEvents = {
   eventSchema: {
     enroll: {
--- a/toolkit/components/normandy/lib/Uptake.jsm
+++ b/toolkit/components/normandy/lib/Uptake.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(
   this, "UptakeTelemetry", "resource://services-common/uptake-telemetry.js");
 
 var EXPORTED_SYMBOLS = ["Uptake"];
 
 const SOURCE_PREFIX = "normandy";
 
 var Uptake = {
--- a/toolkit/components/osfile/modules/osfile_async_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_async_front.jsm
@@ -18,17 +18,16 @@
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["OS"];
 
 var SharedAll = {};
 ChromeUtils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", SharedAll);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
 
 
 // Boilerplate, to simplify the transition to require()
 var LOG = SharedAll.LOG.bind(SharedAll, "Controller");
 var isTypedArray = SharedAll.isTypedArray;
 
 // The constructor for file errors.
--- a/toolkit/components/perfmonitoring/PerformanceStats.jsm
+++ b/toolkit/components/perfmonitoring/PerformanceStats.jsm
@@ -19,17 +19,16 @@ var EXPORTED_SYMBOLS = ["PerformanceStat
  * is a frame, or the internals of the application.
  *
  * Generally, if you have the choice between PerformanceStats and PerformanceWatcher,
  * you should favor PerformanceWatcher.
  */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
-ChromeUtils.import("resource://gre/modules/ObjectUtils.jsm", this);
 ChromeUtils.defineModuleGetter(this, "PromiseUtils",
   "resource://gre/modules/PromiseUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "setTimeout",
   "resource://gre/modules/Timer.jsm");
 ChromeUtils.defineModuleGetter(this, "clearTimeout",
   "resource://gre/modules/Timer.jsm");
 
 // The nsIPerformanceStatsService provides lower-level
--- a/toolkit/components/places/BookmarkJSONUtils.jsm
+++ b/toolkit/components/places/BookmarkJSONUtils.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/. */
 
 var EXPORTED_SYMBOLS = [ "BookmarkJSONUtils" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
 
 Cu.importGlobalProperties(["fetch"]);
 
 ChromeUtils.defineModuleGetter(this, "PlacesBackups",
   "resource://gre/modules/PlacesBackups.jsm");
--- a/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
+++ b/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
@@ -6,17 +6,16 @@
  * Provides functions to handle search engine URLs in the browser history.
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [ "PlacesSearchAutocompleteProvider" ];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "SearchSuggestionController",
   "resource://gre/modules/SearchSuggestionController.jsm");
 
 const SEARCH_ENGINE_TOPIC = "browser-search-engine-modified";
 
 const SearchAutocompleteProviderInternal = {
   /**
--- a/toolkit/components/places/tests/PlacesTestUtils.jsm
+++ b/toolkit/components/places/tests/PlacesTestUtils.jsm
@@ -1,17 +1,16 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "PlacesTestUtils",
 ];
 
 Cu.importGlobalProperties(["URL"]);
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
                                "resource://gre/modules/PlacesUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "TestUtils",
                                "resource://testing-common/TestUtils.jsm");
 
 var PlacesTestUtils = Object.freeze({
   /**
--- a/toolkit/components/promiseworker/PromiseWorker.jsm
+++ b/toolkit/components/promiseworker/PromiseWorker.jsm
@@ -14,18 +14,16 @@
  * Generally, you should use PromiseWorker.jsm along with its worker-side
  * counterpart PromiseWorker.js.
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["BasePromiseWorker"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
 ChromeUtils.defineModuleGetter(this, "PromiseUtils",
   "resource://gre/modules/PromiseUtils.jsm");
 
 /**
  * An implementation of queues (FIFO).
  *
  * The current implementation uses one array, runs in O(n ^ 2), and is optimized
  * for the case in which queues are generally short.
--- a/toolkit/components/prompts/src/CommonDialog.jsm
+++ b/toolkit/components/prompts/src/CommonDialog.jsm
@@ -1,16 +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/. */
 
 var EXPORTED_SYMBOLS = ["CommonDialog"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "EnableDelayHelper",
                                "resource://gre/modules/SharedPromptUtils.jsm");
 
 
 function CommonDialog(args, ui) {
     this.args = args;
     this.ui   = ui;
 }
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -4,17 +4,16 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [ "AboutReader" ];
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/ReaderMode.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "AsyncPrefs", "resource://gre/modules/AsyncPrefs.jsm");
 ChromeUtils.defineModuleGetter(this, "NarrateControls", "resource://gre/modules/narrate/NarrateControls.jsm");
 ChromeUtils.defineModuleGetter(this, "UITelemetry", "resource://gre/modules/UITelemetry.jsm");
 ChromeUtils.defineModuleGetter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
 
 var gStrings = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
 
--- a/toolkit/components/resistfingerprinting/LanguagePrompt.jsm
+++ b/toolkit/components/resistfingerprinting/LanguagePrompt.jsm
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 var EXPORTED_SYMBOLS = ["LanguagePrompt"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const kPrefResistFingerprinting = "privacy.resistFingerprinting";
 const kPrefSpoofEnglish = "privacy.spoof_english";
 const kTopicHttpOnModifyRequest = "http-on-modify-request";
 
 class _LanguagePrompt {
   constructor() {
     this._initialized = false;
--- a/toolkit/components/satchel/AutoCompletePopup.jsm
+++ b/toolkit/components/satchel/AutoCompletePopup.jsm
@@ -1,17 +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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["AutoCompletePopup"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // AutoCompleteResultView is an abstraction around a list of results
 // we got back up from browser-content.js. It implements enough of
 // nsIAutoCompleteController and nsIAutoCompleteInput to make the
 // richlistbox popup work.
 var AutoCompleteResultView = {
   // nsISupports
--- a/toolkit/components/satchel/nsFormAutoCompleteResult.jsm
+++ b/toolkit/components/satchel/nsFormAutoCompleteResult.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["FormAutoCompleteResult"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 function FormAutoCompleteResult(searchString,
                                 searchResult,
                                 defaultIndex,
                                 errorDescription,
                                 values,
                                 labels,
                                 comments,
                                 prevResult) {
--- a/toolkit/components/satchel/nsInputListAutoComplete.js
+++ b/toolkit/components/satchel/nsInputListAutoComplete.js
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/nsFormAutoCompleteResult.jsm");
 
 function InputListAutoComplete() {}
 
 InputListAutoComplete.prototype = {
   classID: Components.ID("{bf1e01d0-953e-11df-981c-0800200c9a66}"),
   QueryInterface: ChromeUtils.generateQI([Ci.nsIInputListAutoComplete]),
 
--- a/toolkit/components/telemetry/TelemetryArchive.jsm
+++ b/toolkit/components/telemetry/TelemetryArchive.jsm
@@ -4,17 +4,16 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "TelemetryArchive"
 ];
 
 ChromeUtils.import("resource://gre/modules/Log.jsm", this);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Preferences.jsm", this);
 ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
 ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
 
 const LOGGER_NAME = "Toolkit.Telemetry";
 const LOGGER_PREFIX = "TelemetryArchive::";
 
 ChromeUtils.defineModuleGetter(this, "TelemetryStorage",
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -5,22 +5,20 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "TelemetryEnvironment",
 ];
 
 const myScope = this;
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Log.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/ObjectUtils.jsm");
-ChromeUtils.import("resource://gre/modules/TelemetryController.jsm", this);
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 const Utils = TelemetryUtils;
 
 const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm", {});
 
 ChromeUtils.defineModuleGetter(this, "AttributionCode",
                                "resource:///modules/AttributionCode.jsm");
--- a/toolkit/components/telemetry/TelemetryHealthPing.jsm
+++ b/toolkit/components/telemetry/TelemetryHealthPing.jsm
@@ -7,18 +7,16 @@
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "TelemetryHealthPing",
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
 ChromeUtils.defineModuleGetter(this, "TelemetryController", "resource://gre/modules/TelemetryController.jsm");
 ChromeUtils.defineModuleGetter(this, "setTimeout", "resource://gre/modules/Timer.jsm");
 ChromeUtils.defineModuleGetter(this, "clearTimeout", "resource://gre/modules/Timer.jsm");
 ChromeUtils.defineModuleGetter(this, "TelemetryUtils", "resource://gre/modules/TelemetryUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "Log", "resource://gre/modules/Log.jsm");
 ChromeUtils.defineModuleGetter(this, "Preferences", "resource://gre/modules/Preferences.jsm");
 
--- a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
+++ b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
@@ -6,17 +6,16 @@
 
 var EXPORTED_SYMBOLS = [
   "TelemetryReportingPolicy"
 ];
 
 ChromeUtils.import("resource://gre/modules/Log.jsm", this);
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://services-common/observers.js", this);
 ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
 
 ChromeUtils.defineModuleGetter(this, "TelemetrySend",
                                "resource://gre/modules/TelemetrySend.jsm");
 
 const LOGGER_NAME = "Toolkit.Telemetry";
 const LOGGER_PREFIX = "TelemetryReportingPolicy::";
--- a/toolkit/components/telemetry/TelemetryStopwatch.jsm
+++ b/toolkit/components/telemetry/TelemetryStopwatch.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/. */
 
 var EXPORTED_SYMBOLS = ["TelemetryStopwatch"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "Log",
   "resource://gre/modules/Log.jsm");
 
 // Weak map does not allow using null objects as keys. These objects are used
 // as 'null' placeholders.
 const NULL_OBJECT = {};
 const NULL_KEY = {};
--- a/toolkit/components/telemetry/UpdatePing.jsm
+++ b/toolkit/components/telemetry/UpdatePing.jsm
@@ -3,17 +3,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/. */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Log.jsm", this);
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 
 ChromeUtils.defineModuleGetter(this, "TelemetryController",
                                "resource://gre/modules/TelemetryController.jsm");
 
 const LOGGER_NAME = "Toolkit.Telemetry";
 const PING_TYPE = "update";
 const UPDATE_DOWNLOADED_TOPIC = "update-downloaded";
 
--- a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
+++ b/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
@@ -1,12 +1,10 @@
 ChromeUtils.import("resource://gre/modules/TelemetryArchive.jsm");
-ChromeUtils.import("resource://testing-common/Assert.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/TelemetryController.jsm");
 
 var EXPORTED_SYMBOLS = [
   "TelemetryArchiveTesting",
 ];
 
 function checkForProperties(ping, expected) {
   for (let [props, val] of expected) {
     let test = ping;
--- a/toolkit/components/thumbnails/PageThumbUtils.jsm
+++ b/toolkit/components/thumbnails/PageThumbUtils.jsm
@@ -4,19 +4,17 @@
 
 /*
  * Common thumbnailing routines used by various consumers, including
  * PageThumbs and backgroundPageThumbsContent.
  */
 
 var EXPORTED_SYMBOLS = ["PageThumbUtils"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 ChromeUtils.defineModuleGetter(this, "BrowserUtils",
   "resource://gre/modules/BrowserUtils.jsm");
 
 var PageThumbUtils = {
   // The default background color for page thumbnails.
   THUMBNAIL_BG_COLOR: "#fff",
   // The namespace for thumbnail canvas elements.
--- a/toolkit/components/utils/JsonSchemaValidator.jsm
+++ b/toolkit/components/utils/JsonSchemaValidator.jsm
@@ -10,17 +10,16 @@
  * - Strings are automatically converted to nsIURIs for the appropriate types.
  * - It doesn't support "pattern" when matching strings.
  * - The boolean type accepts (and casts) 0 and 1 as valid values.
  */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]);
 
 XPCOMUtils.defineLazyGetter(this, "log", () => {
   let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
   return new ConsoleAPI({
     prefix: "JsonSchemaValidator.jsm",
     // tip: set maxLogLevel to "debug" and use log.debug() to create detailed
--- a/toolkit/components/viewsource/ViewSourceBrowser.jsm
+++ b/toolkit/components/viewsource/ViewSourceBrowser.jsm
@@ -1,16 +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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 
 const BUNDLE_URL = "chrome://global/locale/viewSource.properties";
 
 const FRAME_SCRIPT = "chrome://global/content/viewSource-content.js";
 
 var EXPORTED_SYMBOLS = ["ViewSourceBrowser"];
--- a/toolkit/crashreporter/KeyValueParser.jsm
+++ b/toolkit/crashreporter/KeyValueParser.jsm
@@ -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/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "OS",
                                "resource://gre/modules/osfile.jsm");
 
 var EXPORTED_SYMBOLS = [
   "parseKeyValuePairsFromLines",
   "parseKeyValuePairs",
   "parseKeyValuePairsFromFile",
   "parseKeyValuePairsFromFileAsync"
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 var EXPORTED_SYMBOLS = ["ForgetAboutSite"];
 
 var ForgetAboutSite = {
   async removeDataFromDomain(aDomain) {
     let promises = [];
     let errorCount = 0;
 
--- a/toolkit/modules/AutoScrollController.jsm
+++ b/toolkit/modules/AutoScrollController.jsm
@@ -1,17 +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/. */
 
-/* eslint no-unused-vars: ["error", {args: "none"}] */
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var EXPORTED_SYMBOLS = ["AutoScrollController"];
 
 class AutoScrollController {
   constructor(global) {
     this._scrollable = null;
     this._scrolldir = "";
     this._startX = null;
--- a/toolkit/modules/Battery.jsm
+++ b/toolkit/modules/Battery.jsm
@@ -7,18 +7,16 @@
 
 /** This module wraps around navigator.getBattery (https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getBattery).
   * and provides a framework for spoofing battery values in test code.
   * To spoof the battery values, set `Debugging.fake = true` after exporting this with a BackstagePass,
   * after which you can spoof a property yb setting the relevant property of the BatteryManager object.
   */
 var EXPORTED_SYMBOLS = ["GetBattery", "Battery"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
 // Load Services, for the BatteryManager API
 ChromeUtils.defineModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 
 // Values for the fake battery. See the documentation of Navigator.battery for the meaning of each field.
 var gFakeBattery = {
   charging: false,
   chargingTime: 0,
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [ "BrowserUtils" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
   "resource://gre/modules/PlacesUtils.jsm");
 
 var BrowserUtils = {
 
   /**
    * Prints arguments separated by a space and appends a new line.
--- a/toolkit/modules/CanonicalJSON.jsm
+++ b/toolkit/modules/CanonicalJSON.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/. */
 
 var EXPORTED_SYMBOLS = ["CanonicalJSON"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "jsesc",
                                "resource://gre/modules/third_party/jsesc/jsesc.js");
 
 var CanonicalJSON = {
   /**
    * Return the canonical JSON form of the passed source, sorting all the object
    * keys recursively. Note that this method will cause an infinite loop if
    * cycles exist in the source (bug 1265357).
--- a/toolkit/modules/Console.jsm
+++ b/toolkit/modules/Console.jsm
@@ -17,18 +17,16 @@
  * - The Firebug console is a rich display compared with dump(), so there will
  *   be many things that we can't replicate
  * - The primary use of this API is debugging and error logging so the perfect
  *   implementation isn't always required (or even well defined)
  */
 
 var EXPORTED_SYMBOLS = [ "console", "ConsoleAPI" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 Cu.importGlobalProperties(["Element"]);
 
 var gTimerRegistry = new Map();
 
 /**
  * String utility to ensure that strings are a specified length. Strings
--- a/toolkit/modules/DateTimePickerParent.jsm
+++ b/toolkit/modules/DateTimePickerParent.jsm
@@ -10,17 +10,16 @@ function debug(aStr) {
     dump("-*- DateTimePickerParent: " + aStr + "\n");
   }
 }
 
 var EXPORTED_SYMBOLS = [
   "DateTimePickerParent"
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /*
  * DateTimePickerParent receives message from content side (input box) and
  * is reposible for opening, closing and updating the picker. Similarly,
  * DateTimePickerParent listens for picker's events and notifies the content
  * side (input box) about them.
  */
--- a/toolkit/modules/DeferredTask.jsm
+++ b/toolkit/modules/DeferredTask.jsm
@@ -79,18 +79,16 @@ var EXPORTED_SYMBOLS = [
  *
  *   saveDeferredTask.disarm();
  *   saveDeferredTask.finalize().then(() => OS.File.remove(...))
  *                              .then(null, Components.utils.reportError);
  */
 
 // Globals
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "PromiseUtils",
                                "resource://gre/modules/PromiseUtils.jsm");
 
 const Timer = Components.Constructor("@mozilla.org/timer;1", "nsITimer",
                                      "initWithCallback");
 
 // DeferredTask
 
--- a/toolkit/modules/EventEmitter.jsm
+++ b/toolkit/modules/EventEmitter.jsm
@@ -1,16 +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";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "console",
                                "resource://gre/modules/Console.jsm");
 
 var EXPORTED_SYMBOLS = ["EventEmitter"];
 
 let EventEmitter = this.EventEmitter = function() {};
 
--- a/toolkit/modules/FinderIterator.jsm
+++ b/toolkit/modules/FinderIterator.jsm
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["FinderIterator"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "NLP", "resource://gre/modules/NLP.jsm");
 ChromeUtils.defineModuleGetter(this, "Rect", "resource://gre/modules/Geometry.jsm");
 
 const kDebug = false;
 const kIterationSizeMax = 100;
 const kTimeoutPref = "findbar.iteratorTimeout";
 
--- a/toolkit/modules/GMPInstallManager.jsm
+++ b/toolkit/modules/GMPInstallManager.jsm
@@ -2,19 +2,17 @@
  * 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";
 
 // 1 day default
 const DEFAULT_SECONDS_BETWEEN_CHECKS = 60 * 60 * 24;
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Log.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/GMPUtils.jsm");
 ChromeUtils.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
 
 var EXPORTED_SYMBOLS = ["GMPInstallManager", "GMPExtractor", "GMPDownloader",
                         "GMPAddon"];
--- a/toolkit/modules/HiddenFrame.jsm
+++ b/toolkit/modules/HiddenFrame.jsm
@@ -3,17 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["HiddenFrame"];
 
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const XUL_PAGE = "chrome://global/content/win.xul";
 
 const gAllHiddenFrames = new WeakSet();
 
 let cleanupRegistered = false;
 function ensureCleanupRegistered() {
   if (!cleanupRegistered) {
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["LightweightThemeConsumer"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 const DEFAULT_THEME_ID = "default-theme@mozilla.org";
 const ICONS = Services.prefs.getStringPref("extensions.webextensions.themes.icons.buttons", "").split(",");
 
 const toolkitVariableMap = [
   ["--lwt-accent-color", {
     lwtProperty: "accentcolor",
     processColor(rgbaChannels, element) {
--- a/toolkit/modules/ObjectUtils.jsm
+++ b/toolkit/modules/ObjectUtils.jsm
@@ -7,18 +7,16 @@
 // MIT license: http://opensource.org/licenses/MIT
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "ObjectUtils"
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
 // Used only to cause test failures.
 
 var pSlice = Array.prototype.slice;
 
 var ObjectUtils = {
   /**
    * This tests objects & values for deep equality.
    *
--- a/toolkit/modules/PermissionsUtils.jsm
+++ b/toolkit/modules/PermissionsUtils.jsm
@@ -1,16 +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/.
 
 var EXPORTED_SYMBOLS = ["PermissionsUtils"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
 
 
 var gImportedPrefBranches = new Set();
 
 function importPrefBranch(aPrefBranch, aPermission, aAction) {
   let list = Services.prefs.getChildList(aPrefBranch, {});
 
   for (let pref of list) {
--- a/toolkit/modules/Preferences.jsm
+++ b/toolkit/modules/Preferences.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/. */
 
 var EXPORTED_SYMBOLS = ["Preferences"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // The minimum and maximum integers that can be set as preferences.
 // The range of valid values is narrower than the range of valid JS values
 // because the native preferences code treats integers as NSPR PRInt32s,
 // which are 32-bit signed integers on all platforms.
 const MAX_INT = 0x7FFFFFFF; // Math.pow(2, 31) - 1
 const MIN_INT = -0x80000000;
--- a/toolkit/modules/PrintingContent.jsm
+++ b/toolkit/modules/PrintingContent.jsm
@@ -1,17 +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/. */
 
 var EXPORTED_SYMBOLS = ["PrintingContent"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "ReaderMode",
   "resource://gre/modules/ReaderMode.jsm");
 
 var PrintingContent = {
   // Bug 1088061: nsPrintJob's DoCommonPrint currently expects the
   // progress listener passed to it to QI to an nsIPrintingPromptService
   // in order to know that a printing progress dialog has been shown. That's
--- a/toolkit/modules/RemotePageManager.jsm
+++ b/toolkit/modules/RemotePageManager.jsm
@@ -16,17 +16,16 @@ var EXPORTED_SYMBOLS = ["RemotePages", "
  * * When adding a new consumer of RPM that relies on other functionality
  *   then simple message passing provided by the RPM, then one has to
  *   whitelist permissions for the new URI within the RPMAccessManager.
  *
  * Please note that prefs that one wants to update need to be whitelisted
  * within AsyncPrefs.jsm.
  */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "AsyncPrefs",
   "resource://gre/modules/AsyncPrefs.jsm");
 ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 /*
  * Used for all kinds of permissions checks which requires explicit
--- a/toolkit/modules/RemoteSecurityUI.jsm
+++ b/toolkit/modules/RemoteSecurityUI.jsm
@@ -1,17 +1,15 @@
 // -*- 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/.
 
 var EXPORTED_SYMBOLS = ["RemoteSecurityUI"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 function RemoteSecurityUI() {
     this._SSLStatus = null;
     this._state = 0;
 }
 
 RemoteSecurityUI.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsISSLStatusProvider, Ci.nsISecureBrowserUI]),
 
--- a/toolkit/modules/RemoteWebProgress.jsm
+++ b/toolkit/modules/RemoteWebProgress.jsm
@@ -1,16 +1,15 @@
 // -*- 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/.
 
 var EXPORTED_SYMBOLS = ["RemoteWebProgressManager"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function RemoteWebProgressRequest(spec, originalSpec, matchedList, requestCPOW) {
   this.wrappedJSObject = this;
 
   this._uri = Services.io.newURI(spec);
   this._originalURI = Services.io.newURI(originalSpec);
   this._requestCPOW = requestCPOW;
--- a/toolkit/modules/Timer.jsm
+++ b/toolkit/modules/Timer.jsm
@@ -6,18 +6,16 @@
 
 /**
  * JS module implementation of setTimeout and clearTimeout.
  */
 
 var EXPORTED_SYMBOLS = ["setTimeout", "setTimeoutWithTarget", "clearTimeout",
                         "setInterval", "setIntervalWithTarget", "clearInterval"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 // This gives us >=2^30 unique timer IDs, enough for 1 per ms for 12.4 days.
 var gNextId = 1; // setTimeout and setInterval must return a positive integer
 
 var gTimerTable = new Map(); // int -> nsITimer
 
 // Don't generate this for every timer.
 var setTimeout_timerCallbackQI = ChromeUtils.generateQI([Ci.nsITimerCallback, Ci.nsINamed]);
 
--- a/toolkit/modules/WebChannel.jsm
+++ b/toolkit/modules/WebChannel.jsm
@@ -10,17 +10,16 @@
 var EXPORTED_SYMBOLS = ["WebChannel", "WebChannelBroker"];
 
 const ERRNO_MISSING_PRINCIPAL          = 1;
 const ERRNO_NO_SUCH_CHANNEL            = 2;
 const ERRNO_UNKNOWN_ERROR              = 999;
 const ERROR_UNKNOWN                    = "UNKNOWN_ERROR";
 
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 
 /**
  * WebChannelBroker is a global object that helps manage WebChannel objects.
  * This object handles channel registration, origin validation and message multiplexing.
  */
 
--- a/toolkit/modules/ZipUtils.jsm
+++ b/toolkit/modules/ZipUtils.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/. */
 
 var EXPORTED_SYMBOLS = [ "ZipUtils" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "FileUtils",
                                "resource://gre/modules/FileUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "OS",
                                "resource://gre/modules/osfile.jsm");
 
 
--- a/toolkit/modules/addons/MatchURLFilters.jsm
+++ b/toolkit/modules/addons/MatchURLFilters.jsm
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 
 /* exported MatchURLFilters */
 
 var EXPORTED_SYMBOLS = ["MatchURLFilters"];
 
 // Match WebNavigation URL Filters.
--- a/toolkit/modules/addons/WebNavigation.jsm
+++ b/toolkit/modules/addons/WebNavigation.jsm
@@ -1,17 +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/. */
 
 "use strict";
 
 const EXPORTED_SYMBOLS = ["WebNavigation"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "BrowserWindowTracker",
                                "resource:///modules/BrowserWindowTracker.jsm");
 
 // Maximum amount of time that can be passed and still consider
 // the data recent (similar to how is done in nsNavHistory,
 // e.g. nsNavHistory::CheckIsRecentEvent, but with a lower threshold value).
--- a/toolkit/modules/sessionstore/FormData.jsm
+++ b/toolkit/modules/sessionstore/FormData.jsm
@@ -1,17 +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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["FormData"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "CreditCard",
   "resource://gre/modules/CreditCard.jsm");
 
 /**
  * Returns whether the given URL very likely has input
  * fields that contain serialized session store data.
  */
 function isRestorationPage(url) {
--- a/toolkit/modules/sessionstore/PrivacyFilter.jsm
+++ b/toolkit/modules/sessionstore/PrivacyFilter.jsm
@@ -1,18 +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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["PrivacyFilter"];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
 ChromeUtils.defineModuleGetter(this, "PrivacyLevel",
   "resource://gre/modules/sessionstore/PrivacyLevel.jsm");
 
 /**
  * A module that provides methods to filter various kinds of data collected
  * from a tab by the current privacy level as set by the user.
  */
 var PrivacyFilter = Object.freeze({
--- a/toolkit/modules/subprocess/.eslintrc.js
+++ b/toolkit/modules/subprocess/.eslintrc.js
@@ -1,13 +1,15 @@
 "use strict";
 
 module.exports = {
   "extends": "../../components/extensions/.eslintrc.js",
 
   "env": {
     "mozilla/chrome-worker": true,
   },
-
+  "plugins": [
+    "mozilla"
+  ],
   "rules": {
     "no-console": "off",
   },
 };
--- a/toolkit/modules/subprocess/Subprocess.jsm
+++ b/toolkit/modules/subprocess/Subprocess.jsm
@@ -14,17 +14,16 @@
 
 var EXPORTED_SYMBOLS = ["Subprocess"];
 
 /* exported Subprocess */
 
 Cu.importGlobalProperties(["TextEncoder"]);
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/subprocess/subprocess_common.jsm");
 
 if (AppConstants.platform == "win") {
   ChromeUtils.defineModuleGetter(this, "SubprocessImpl",
                                  "resource://gre/modules/subprocess/subprocess_win.jsm");
 } else {
   ChromeUtils.defineModuleGetter(this, "SubprocessImpl",
                                  "resource://gre/modules/subprocess/subprocess_unix.jsm");
--- a/toolkit/modules/subprocess/subprocess_common.jsm
+++ b/toolkit/modules/subprocess/subprocess_common.jsm
@@ -2,20 +2,17 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 
-/* exported BaseProcess, PromiseWorker */
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.importGlobalProperties(["TextDecoder"]);
 
 ChromeUtils.defineModuleGetter(this, "AsyncShutdown",
                                "resource://gre/modules/AsyncShutdown.jsm");
 ChromeUtils.defineModuleGetter(this, "setTimeout",
                                "resource://gre/modules/Timer.jsm");
 
 Services.scriptloader.loadSubScript("resource://gre/modules/subprocess/subprocess_shared.js", this);
--- a/toolkit/modules/subprocess/subprocess_unix.jsm
+++ b/toolkit/modules/subprocess/subprocess_unix.jsm
@@ -2,18 +2,16 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 
-/* exported SubprocessImpl */
-
 Cu.importGlobalProperties(["TextDecoder"]);
 
 var EXPORTED_SYMBOLS = ["SubprocessImpl"];
 
 ChromeUtils.import("resource://gre/modules/ctypes.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/subprocess/subprocess_common.jsm");
--- a/toolkit/modules/subprocess/subprocess_win.jsm
+++ b/toolkit/modules/subprocess/subprocess_win.jsm
@@ -2,18 +2,16 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 
-/* exported SubprocessImpl */
-
 var EXPORTED_SYMBOLS = ["SubprocessImpl"];
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/ctypes.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/subprocess/subprocess_common.jsm");
--- a/toolkit/modules/tests/modules/MockDocument.jsm
+++ b/toolkit/modules/tests/modules/MockDocument.jsm
@@ -2,17 +2,16 @@
  * Provides infrastructure for tests that would require mock document.
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["MockDocument"];
 
 Cu.importGlobalProperties(["DOMParser", "URL"]);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm", {});
 
 const MockDocument = {
   /**
    * Create a document for the given URL containing the given HTML with the ownerDocument of all <form>s having a mocked location.
    */
   createTestDocument(aDocumentURL, aContent = "<form>", aType = "text/html") {
@@ -74,9 +73,8 @@ const MockDocument = {
     fileStream.init(aFile, -1, -1, 0);
 
     let data = NetUtil.readInputStreamToString(fileStream, fileStream.available());
 
     return this.createTestDocument(aDocumentURL, data);
   },
 
 };
-
--- a/toolkit/mozapps/downloads/DownloadLastDir.jsm
+++ b/toolkit/mozapps/downloads/DownloadLastDir.jsm
@@ -25,19 +25,17 @@
  */
 
 const LAST_DIR_PREF = "browser.download.lastDir";
 const SAVE_PER_SITE_PREF = LAST_DIR_PREF + ".savePerSite";
 const nsIFile = Ci.nsIFile;
 
 var EXPORTED_SYMBOLS = [ "DownloadLastDir" ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 let nonPrivateLoadContext = Cc["@mozilla.org/loadcontext;1"].
                               createInstance(Ci.nsILoadContext);
 let privateLoadContext = Cc["@mozilla.org/privateloadcontext;1"].
                               createInstance(Ci.nsILoadContext);
 
 var observer = {
   QueryInterface: ChromeUtils.generateQI(["nsIObserver",
--- a/toolkit/mozapps/downloads/DownloadUtils.jsm
+++ b/toolkit/mozapps/downloads/DownloadUtils.jsm
@@ -32,17 +32,16 @@ var EXPORTED_SYMBOLS = [ "DownloadUtils"
  *
  * [string convertedBytes, string units]
  * convertByteUnits(int aBytes)
  *
  * [int time, string units, int subTime, string subUnits]
  * convertTimeUnits(double aSecs)
  */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "PluralForm",
                                "resource://gre/modules/PluralForm.jsm");
 
 const MS_PER_DAY = 24 * 60 * 60 * 1000;
 
 var localeNumberFormatCache = new Map();
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -12,17 +12,16 @@
 var EXPORTED_SYMBOLS = [ "AddonUpdateChecker" ];
 
 const TIMEOUT               = 60 * 1000;
 const TOOLKIT_ID            = "toolkit@mozilla.org";
 
 const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "AddonManager",
                                "resource://gre/modules/AddonManager.jsm");
 ChromeUtils.defineModuleGetter(this, "AddonManagerPrivate",
                                "resource://gre/modules/AddonManager.jsm");
 ChromeUtils.defineModuleGetter(this, "AddonRepository",
                                "resource://gre/modules/addons/AddonRepository.jsm");
 ChromeUtils.defineModuleGetter(this, "Blocklist",
--- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
@@ -15,18 +15,16 @@ const LOCAL_GMP_SOURCES = [{
 }];
 
 var EXPORTED_SYMBOLS = [ "ProductAddonChecker" ];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Log.jsm");
 ChromeUtils.import("resource://gre/modules/CertUtils.jsm");
-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["XMLHttpRequest"]);
 
 /* globals GMPPrefs */
 ChromeUtils.defineModuleGetter(this, "GMPPrefs",
                                "resource://gre/modules/GMPUtils.jsm");
 
--- a/toolkit/mozapps/update/UpdateListener.jsm
+++ b/toolkit/mozapps/update/UpdateListener.jsm
@@ -3,17 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["UpdateListener"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "AppMenuNotifications",
                                "resource://gre/modules/AppMenuNotifications.jsm");
 
 // Setup the hamburger button badges for updates, if enabled.
 var UpdateListener = {
   timeouts: [],