From 2fe0de01dc61949eb43f96fef79ddd82455445d7 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 11 Jan 2019 16:59:23 -0800 Subject: [PATCH] Bug 1519596: Part 1 - Remove several unnecessary/unused ChromeUtils.import() calls. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D16377 --HG-- extra : rebase_source : 6c4311387d25de425806aeb6c4691e12c9fcb855 --- accessible/jsat/AccessFu.jsm | 4 ---- accessible/tests/mochitest/jsat/jsatcommon.js | 2 -- browser/actors/PluginChild.jsm | 1 - browser/components/customizableui/CustomizeMode.jsm | 1 - browser/components/distribution.js | 1 - browser/components/downloads/content/indicator.js | 2 -- .../enterprisepolicies/content/aboutPolicies.js | 1 - .../tests/browser/browser_policy_bookmarks.js | 1 - browser/components/preferences/clearSiteData.js | 2 -- browser/components/preferences/containers.js | 1 - browser/components/preferences/in-content/containers.js | 1 - .../preferences/in-content/extensionControlled.js | 2 -- browser/components/preferences/in-content/main.js | 2 -- browser/components/preferences/in-content/preferences.js | 1 - browser/components/preferences/in-content/privacy.js | 8 ++------ browser/components/preferences/in-content/search.js | 1 - .../components/preferences/in-content/syncDisconnect.js | 7 ++----- .../in-content/tests/browser_advanced_update.js | 2 -- .../preferences/in-content/tests/browser_bug410900.js | 3 --- .../preferences/in-content/tests/browser_bug731866.js | 3 --- .../in-content/tests/browser_bug795764_cachedisabled.js | 3 --- .../tests/browser_site_autoplay_media_exceptions.js | 2 -- browser/components/preferences/siteDataSettings.js | 1 - browser/components/preferences/translation.js | 1 - .../sessionstore/content/aboutSessionRestore.js | 1 - browser/components/sessionstore/test/content.js | 2 -- browser/components/syncedtabs/sidebar.js | 1 - .../test/xpcshell/test_SyncedTabsDeckComponent.js | 1 - .../syncedtabs/test/xpcshell/test_TabListComponent.js | 1 - browser/components/uitour/UITour.jsm | 1 - browser/extensions/formautofill/FormAutofillNameUtils.jsm | 2 -- browser/extensions/formautofill/FormAutofillSync.jsm | 1 - browser/modules/ContentObservers.js | 1 - browser/modules/Windows8WindowFrameColor.jsm | 2 +- browser/modules/test/unit/test_LiveBookmarkMigrator.js | 2 -- chrome/test/unit/test_bug848297.js | 1 - chrome/test/unit/test_no_remote_registration.js | 2 -- docshell/test/browser/file_bug422543_script.js | 2 -- docshell/test/chrome/test_bug909218.html | 2 -- .../test/chrome/test_viewsource_forbidden_in_iframe.xul | 2 -- dom/base/DOMRequestHelper.jsm | 1 - dom/base/IndexedDBHelper.jsm | 1 - dom/base/ProcessSelector.js | 1 - dom/base/test/chrome/file_bug549682.xul | 2 -- dom/base/test/chrome/test_bug800386.xul | 2 -- dom/base/test/test_navigator_resolve_identity_xrays.xul | 2 -- dom/bindings/test/TestInterfaceJSMaplike.js | 1 - dom/browser-element/BrowserElementChildPreload.js | 1 - dom/browser-element/BrowserElementParent.js | 1 - dom/browser-element/BrowserElementPromptService.jsm | 1 - dom/push/PushRecord.jsm | 1 - dom/push/PushServiceHttp2.jsm | 1 - dom/push/PushServiceWebSocket.jsm | 2 -- dom/xslt/xslt/txEXSLTRegExFunctions.jsm | 2 -- services/fxaccounts/FxAccounts.jsm | 1 - services/settings/RemoteSettingsComponents.js | 1 - services/sync/modules/addonsreconciler.js | 1 - services/sync/modules/bookmark_repair.js | 1 - services/sync/modules/bookmark_validator.js | 1 - services/sync/modules/collection_repair.js | 1 - services/sync/modules/collection_validator.js | 2 -- services/sync/modules/doctor.js | 1 - services/sync/modules/engines.js | 1 - services/sync/modules/engines/addons.js | 1 - services/sync/modules/engines/clients.js | 1 - services/sync/modules/engines/extension-storage.js | 1 - services/sync/modules/engines/forms.js | 1 - services/sync/modules/engines/history.js | 1 - services/sync/modules/keys.js | 1 - services/sync/modules/stages/declined.js | 2 -- services/sync/modules/stages/enginesync.js | 1 - services/sync/modules/status.js | 1 - services/sync/tps/extensions/tps/api.js | 1 - .../sync/tps/extensions/tps/resource/modules/addons.jsm | 1 - testing/mochitest/api.js | 2 -- testing/mochitest/tests/Harness_sanity/ImportTesting.jsm | 4 +--- testing/talos/talos/tests/tabswitch/api.js | 1 - toolkit/components/normandy/lib/AddonStudies.jsm | 1 - toolkit/components/passwordmgr/LoginImport.jsm | 2 -- toolkit/components/passwordmgr/LoginManagerContent.jsm | 1 - toolkit/components/passwordmgr/LoginStore.jsm | 1 - toolkit/components/passwordmgr/OSCrypto_win.js | 3 --- toolkit/components/passwordmgr/content/passwordManager.js | 1 - toolkit/components/passwordmgr/nsLoginManager.js | 2 -- toolkit/components/passwordmgr/test/LoginTestUtils.jsm | 1 - toolkit/components/telemetry/app/TelemetryController.jsm | 1 - toolkit/modules/PromiseUtils.jsm | 1 - toolkit/modules/RemoteController.js | 2 -- uriloader/exthandler/tests/HandlerServiceTestUtils.jsm | 1 - 89 files changed, 6 insertions(+), 136 deletions(-) diff --git a/accessible/jsat/AccessFu.jsm b/accessible/jsat/AccessFu.jsm index 0e38c2ec2e25..71950f3ca507 100644 --- a/accessible/jsat/AccessFu.jsm +++ b/accessible/jsat/AccessFu.jsm @@ -11,10 +11,6 @@ ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm"); ChromeUtils.defineModuleGetter(this, "Rect", "resource://gre/modules/Geometry.jsm"); -if (Utils.MozBuildApp === "mobile/android") { - ChromeUtils.import("resource://gre/modules/Messaging.jsm"); -} - const GECKOVIEW_MESSAGE = { ACTIVATE: "GeckoView:AccessibilityActivate", BY_GRANULARITY: "GeckoView:AccessibilityByGranularity", diff --git a/accessible/tests/mochitest/jsat/jsatcommon.js b/accessible/tests/mochitest/jsat/jsatcommon.js index d673a8b8900f..8070fb7d47ed 100644 --- a/accessible/tests/mochitest/jsat/jsatcommon.js +++ b/accessible/tests/mochitest/jsat/jsatcommon.js @@ -16,8 +16,6 @@ var gIterator; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm"); -ChromeUtils.import("resource://gre/modules/accessibility/EventManager.jsm"); -ChromeUtils.import("resource://gre/modules/accessibility/Constants.jsm"); const MovementGranularity = { CHARACTER: 1, diff --git a/browser/actors/PluginChild.jsm b/browser/actors/PluginChild.jsm index 399b6dedb67a..3d38573997f3 100644 --- a/browser/actors/PluginChild.jsm +++ b/browser/actors/PluginChild.jsm @@ -10,7 +10,6 @@ ChromeUtils.import("resource://gre/modules/ActorChild.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.import("resource://gre/modules/Timer.jsm"); ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm"); ChromeUtils.defineModuleGetter(this, "ContextMenuChild", diff --git a/browser/components/customizableui/CustomizeMode.jsm b/browser/components/customizableui/CustomizeMode.jsm index a46239e1b382..245ed94b57fd 100644 --- a/browser/components/customizableui/CustomizeMode.jsm +++ b/browser/components/customizableui/CustomizeMode.jsm @@ -24,7 +24,6 @@ const kDownloadAutoHidePref = "browser.download.autohideButton"; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource:///modules/CustomizableUI.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyGlobalGetters(this, ["CSS"]); diff --git a/browser/components/distribution.js b/browser/components/distribution.js index feaad9d0c720..63b2f8e1a239 100644 --- a/browser/components/distribution.js +++ b/browser/components/distribution.js @@ -11,7 +11,6 @@ const PREF_CACHED_FILE_EXISTENCE = "distribution.iniFile.exists.value"; const PREF_CACHED_FILE_APPVERSION = "distribution.iniFile.exists.appversion"; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.defineModuleGetter(this, "Preferences", "resource://gre/modules/Preferences.jsm"); diff --git a/browser/components/downloads/content/indicator.js b/browser/components/downloads/content/indicator.js index a652f57de736..3d9bf0291ec6 100644 --- a/browser/components/downloads/content/indicator.js +++ b/browser/components/downloads/content/indicator.js @@ -27,8 +27,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); - // DownloadsButton /** diff --git a/browser/components/enterprisepolicies/content/aboutPolicies.js b/browser/components/enterprisepolicies/content/aboutPolicies.js index a234fc14b392..c17dec1d8281 100644 --- a/browser/components/enterprisepolicies/content/aboutPolicies.js +++ b/browser/components/enterprisepolicies/content/aboutPolicies.js @@ -4,7 +4,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/components/enterprisepolicies/tests/browser/browser_policy_bookmarks.js b/browser/components/enterprisepolicies/tests/browser/browser_policy_bookmarks.js index 6ba46286baed..0bf34bbbf7de 100644 --- a/browser/components/enterprisepolicies/tests/browser/browser_policy_bookmarks.js +++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_bookmarks.js @@ -3,7 +3,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); diff --git a/browser/components/preferences/clearSiteData.js b/browser/components/preferences/clearSiteData.js index 8e4a4c217ae4..52525ed22183 100644 --- a/browser/components/preferences/clearSiteData.js +++ b/browser/components/preferences/clearSiteData.js @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource:///modules/SiteDataManager.jsm"); diff --git a/browser/components/preferences/containers.js b/browser/components/preferences/containers.js index 2fc601a3634a..fb28e58e1226 100644 --- a/browser/components/preferences/containers.js +++ b/browser/components/preferences/containers.js @@ -2,7 +2,6 @@ * 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/ContextualIdentityService.jsm"); /** diff --git a/browser/components/preferences/in-content/containers.js b/browser/components/preferences/in-content/containers.js index d51feef5052a..f32cd4f07655 100644 --- a/browser/components/preferences/in-content/containers.js +++ b/browser/components/preferences/in-content/containers.js @@ -4,7 +4,6 @@ /* import-globals-from preferences.js */ -ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm"); const defaultContainerIcon = "fingerprint"; diff --git a/browser/components/preferences/in-content/extensionControlled.js b/browser/components/preferences/in-content/extensionControlled.js index 0d484454e765..5cd7d093e11d 100644 --- a/browser/components/preferences/in-content/extensionControlled.js +++ b/browser/components/preferences/in-content/extensionControlled.js @@ -6,8 +6,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - ChromeUtils.defineModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm"); ChromeUtils.defineModuleGetter(this, "BrowserUtils", diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js index 5e50d56b6191..64f6d546516a 100644 --- a/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js @@ -10,10 +10,8 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Downloads.jsm"); ChromeUtils.import("resource://gre/modules/FileUtils.jsm"); -ChromeUtils.import("resource:///modules/ShellService.jsm"); ChromeUtils.import("resource:///modules/TransientPrefs.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); -ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm"); ChromeUtils.import("resource://gre/modules/Localization.jsm"); ChromeUtils.defineModuleGetter(this, "CloudStorage", diff --git a/browser/components/preferences/in-content/preferences.js b/browser/components/preferences/in-content/preferences.js index 4139a9ee7e73..d28995b71ff4 100644 --- a/browser/components/preferences/in-content/preferences.js +++ b/browser/components/preferences/in-content/preferences.js @@ -17,7 +17,6 @@ "use strict"; ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.defineModuleGetter(this, "formAutofillParent", "resource://formautofill/FormAutofillParent.jsm"); diff --git a/browser/components/preferences/in-content/privacy.js b/browser/components/preferences/in-content/privacy.js index 76363495f7b6..3edff9fd460f 100644 --- a/browser/components/preferences/in-content/privacy.js +++ b/browser/components/preferences/in-content/privacy.js @@ -5,14 +5,10 @@ /* import-globals-from extensionControlled.js */ /* import-globals-from preferences.js */ -/* FIXME: ESlint globals workaround should be removed once bug 1395426 gets fixed */ -/* globals DownloadUtils, LoadContextInfo */ - ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); -ChromeUtils.import("resource://gre/modules/PluralForm.jsm"); -ChromeUtils.defineModuleGetter(this, "PluralForm", - "resource://gre/modules/PluralForm.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadUtils", + "resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.defineModuleGetter(this, "LoginHelper", "resource://gre/modules/LoginHelper.jsm"); ChromeUtils.defineModuleGetter(this, "SiteDataManager", diff --git a/browser/components/preferences/in-content/search.js b/browser/components/preferences/in-content/search.js index 1d0cd49a6610..8c06030f38b0 100644 --- a/browser/components/preferences/in-content/search.js +++ b/browser/components/preferences/in-content/search.js @@ -5,7 +5,6 @@ /* import-globals-from extensionControlled.js */ /* import-globals-from preferences.js */ -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.defineModuleGetter(this, "ExtensionSettingsStore", diff --git a/browser/components/preferences/in-content/syncDisconnect.js b/browser/components/preferences/in-content/syncDisconnect.js index c8a777a3b6a4..3295717bfbf1 100644 --- a/browser/components/preferences/in-content/syncDisconnect.js +++ b/browser/components/preferences/in-content/syncDisconnect.js @@ -2,11 +2,8 @@ // 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"); - -XPCOMUtils.defineLazyModuleGetters(this, { - SyncDisconnect: "resource://services-sync/SyncDisconnect.jsm", -}); +ChromeUtils.defineModuleGetter(this, "SyncDisconnect", + "resource://services-sync/SyncDisconnect.jsm"); let gSyncDisconnectDialog = { init() { diff --git a/browser/components/preferences/in-content/tests/browser_advanced_update.js b/browser/components/preferences/in-content/tests/browser_advanced_update.js index 7a19aaace32a..3dd06570306e 100644 --- a/browser/components/preferences/in-content/tests/browser_advanced_update.js +++ b/browser/components/preferences/in-content/tests/browser_advanced_update.js @@ -5,8 +5,6 @@ const Cm = Components.manager; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); const mockUpdateManager = { diff --git a/browser/components/preferences/in-content/tests/browser_bug410900.js b/browser/components/preferences/in-content/tests/browser_bug410900.js index 247d8225fe01..aa8a43a1cd8d 100644 --- a/browser/components/preferences/in-content/tests/browser_bug410900.js +++ b/browser/components/preferences/in-content/tests/browser_bug410900.js @@ -1,9 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); -ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); - function test() { waitForExplicitFinish(); diff --git a/browser/components/preferences/in-content/tests/browser_bug731866.js b/browser/components/preferences/in-content/tests/browser_bug731866.js index 791a07150c6d..f095027178f0 100644 --- a/browser/components/preferences/in-content/tests/browser_bug731866.js +++ b/browser/components/preferences/in-content/tests/browser_bug731866.js @@ -1,9 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); -ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); - const browserContainersGroupDisabled = !SpecialPowers.getBoolPref("privacy.userContext.ui.enabled"); function test() { diff --git a/browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js b/browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js index 3e9b1e932805..f8f67983f6c0 100644 --- a/browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js +++ b/browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js @@ -1,9 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); -ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); - function test() { waitForExplicitFinish(); diff --git a/browser/components/preferences/in-content/tests/browser_site_autoplay_media_exceptions.js b/browser/components/preferences/in-content/tests/browser_site_autoplay_media_exceptions.js index 125c6fe1f188..3830f022cb22 100644 --- a/browser/components/preferences/in-content/tests/browser_site_autoplay_media_exceptions.js +++ b/browser/components/preferences/in-content/tests/browser_site_autoplay_media_exceptions.js @@ -1,7 +1,5 @@ "use strict"; -ChromeUtils.import("resource:///modules/SitePermissions.jsm"); - const URL = "http://www.example.com"; const PRINCIPAL = Services.scriptSecurityManager .createCodebasePrincipal(Services.io.newURI(URL), {}); diff --git a/browser/components/preferences/siteDataSettings.js b/browser/components/preferences/siteDataSettings.js index b43de90e449e..fd5350f18813 100644 --- a/browser/components/preferences/siteDataSettings.js +++ b/browser/components/preferences/siteDataSettings.js @@ -6,7 +6,6 @@ "use strict"; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.defineModuleGetter(this, "SiteDataManager", diff --git a/browser/components/preferences/translation.js b/browser/components/preferences/translation.js index 3a6630903327..40a7e1ceb9b8 100644 --- a/browser/components/preferences/translation.js +++ b/browser/components/preferences/translation.js @@ -5,7 +5,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); const kPermissionType = "translate"; diff --git a/browser/components/sessionstore/content/aboutSessionRestore.js b/browser/components/sessionstore/content/aboutSessionRestore.js index 635d7df28623..ee00448b87c9 100644 --- a/browser/components/sessionstore/content/aboutSessionRestore.js +++ b/browser/components/sessionstore/content/aboutSessionRestore.js @@ -5,7 +5,6 @@ "use strict"; ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm"); ChromeUtils.defineModuleGetter(this, "SessionStore", diff --git a/browser/components/sessionstore/test/content.js b/browser/components/sessionstore/test/content.js index 6204fcbc7e32..104cc0d8bbcd 100644 --- a/browser/components/sessionstore/test/content.js +++ b/browser/components/sessionstore/test/content.js @@ -6,8 +6,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - function executeSoon(callback) { Services.tm.dispatchToMainThread(callback); } diff --git a/browser/components/syncedtabs/sidebar.js b/browser/components/syncedtabs/sidebar.js index 32ec08c98ff8..148980bd1dbb 100644 --- a/browser/components/syncedtabs/sidebar.js +++ b/browser/components/syncedtabs/sidebar.js @@ -4,7 +4,6 @@ "use strict"; -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://services-sync/SyncedTabs.jsm"); ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsDeckComponent.js"); ChromeUtils.import("resource:///actors/LightweightThemeChild.jsm"); diff --git a/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js b/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js index 835276ba1724..50b8580e1fd9 100644 --- a/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js +++ b/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js @@ -6,7 +6,6 @@ let { TabListComponent } = ChromeUtils.import("resource:///modules/syncedtabs/Ta let { SyncedTabsListStore } = ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsListStore.js", {}); let { SyncedTabsDeckStore } = ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsDeckStore.js", {}); let { TabListView } = ChromeUtils.import("resource:///modules/syncedtabs/TabListView.js", {}); -let { DeckView } = ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsDeckView.js", {}); add_task(async function testInitUninit() { diff --git a/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js b/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js index eca28494de98..ca88250c3aa9 100644 --- a/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js +++ b/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js @@ -3,7 +3,6 @@ let { SyncedTabs } = ChromeUtils.import("resource://services-sync/SyncedTabs.jsm", {}); let { TabListComponent } = ChromeUtils.import("resource:///modules/syncedtabs/TabListComponent.js", {}); let { SyncedTabsListStore } = ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsListStore.js", {}); -let { View } = ChromeUtils.import("resource:///modules/syncedtabs/TabListView.js", {}); let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {}); const ACTION_METHODS = [ diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index e38573f95ef0..c4b7c251dba4 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -9,7 +9,6 @@ var EXPORTED_SYMBOLS = ["UITour"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/TelemetryController.jsm"); -ChromeUtils.import("resource://gre/modules/Timer.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]); diff --git a/browser/extensions/formautofill/FormAutofillNameUtils.jsm b/browser/extensions/formautofill/FormAutofillNameUtils.jsm index 58193c1d0e78..03631cf993da 100644 --- a/browser/extensions/formautofill/FormAutofillNameUtils.jsm +++ b/browser/extensions/formautofill/FormAutofillNameUtils.jsm @@ -6,8 +6,6 @@ var EXPORTED_SYMBOLS = ["FormAutofillNameUtils"]; -ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); - // FormAutofillNameUtils is initially translated from // https://cs.chromium.org/chromium/src/components/autofill/core/browser/autofill_data_util.cc?rcl=b861deff77abecff11ae6a9f6946e9cc844b9817 var FormAutofillNameUtils = { diff --git a/browser/extensions/formautofill/FormAutofillSync.jsm b/browser/extensions/formautofill/FormAutofillSync.jsm index e17490d4bdc5..3ceab907c6a7 100644 --- a/browser/extensions/formautofill/FormAutofillSync.jsm +++ b/browser/extensions/formautofill/FormAutofillSync.jsm @@ -11,7 +11,6 @@ ChromeUtils.import("resource://services-sync/engines.js"); ChromeUtils.import("resource://services-sync/record.js"); ChromeUtils.import("resource://services-sync/util.js"); ChromeUtils.import("resource://services-sync/constants.js"); -ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); ChromeUtils.defineModuleGetter(this, "Log", "resource://gre/modules/Log.jsm"); diff --git a/browser/modules/ContentObservers.js b/browser/modules/ContentObservers.js index d95e4d09e7f3..408f233c9288 100644 --- a/browser/modules/ContentObservers.js +++ b/browser/modules/ContentObservers.js @@ -15,7 +15,6 @@ "use strict"; ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "WebRTCChild", "resource:///actors/WebRTCChild.jsm"); diff --git a/browser/modules/Windows8WindowFrameColor.jsm b/browser/modules/Windows8WindowFrameColor.jsm index e6baf04b1d85..542f8c0245b0 100644 --- a/browser/modules/Windows8WindowFrameColor.jsm +++ b/browser/modules/Windows8WindowFrameColor.jsm @@ -6,7 +6,7 @@ var EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"]; -var Registry = ChromeUtils.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry; +var {WindowsRegistry: Registry} = ChromeUtils.import("resource://gre/modules/WindowsRegistry.jsm", null); var Windows8WindowFrameColor = { _windowFrameColor: null, diff --git a/browser/modules/test/unit/test_LiveBookmarkMigrator.js b/browser/modules/test/unit/test_LiveBookmarkMigrator.js index 3d8515588894..55cd4514321a 100644 --- a/browser/modules/test/unit/test_LiveBookmarkMigrator.js +++ b/browser/modules/test/unit/test_LiveBookmarkMigrator.js @@ -5,8 +5,6 @@ /* globals ChromeUtils, Assert, add_task */ "use strict"; -ChromeUtils.import("resource://gre/modules/Services.jsm"); - // Ensure we initialize places: do_get_profile(); diff --git a/chrome/test/unit/test_bug848297.js b/chrome/test/unit/test_bug848297.js index 1c4b700e3be1..325a58a01901 100644 --- a/chrome/test/unit/test_bug848297.js +++ b/chrome/test/unit/test_bug848297.js @@ -8,7 +8,6 @@ var MANIFESTS = [ ]; // Stub in the locale service so we can control what gets returned as the OS locale setting -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); registerManifests(MANIFESTS); diff --git a/chrome/test/unit/test_no_remote_registration.js b/chrome/test/unit/test_no_remote_registration.js index 4f4b751efb67..845fabc0fc18 100644 --- a/chrome/test/unit/test_no_remote_registration.js +++ b/chrome/test/unit/test_no_remote_registration.js @@ -10,8 +10,6 @@ var manifests = [ ]; registerManifests(manifests); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - function ProtocolHandler(aScheme, aFlags) { this.scheme = aScheme; this.protocolFlags = aFlags; diff --git a/docshell/test/browser/file_bug422543_script.js b/docshell/test/browser/file_bug422543_script.js index 91cd57a65fbd..04f5a297df93 100644 --- a/docshell/test/browser/file_bug422543_script.js +++ b/docshell/test/browser/file_bug422543_script.js @@ -1,5 +1,3 @@ -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - function SHistoryListener() { } diff --git a/docshell/test/chrome/test_bug909218.html b/docshell/test/chrome/test_bug909218.html index 836fb21a4843..087317123ed4 100644 --- a/docshell/test/chrome/test_bug909218.html +++ b/docshell/test/chrome/test_bug909218.html @@ -9,8 +9,6 @@ SimpleTest.waitForExplicitFinish(); addLoadEvent(test); -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - // The default flags we will stick on the docShell - every request made by the // docShell should include those flags. const TEST_FLAGS = Ci.nsIRequest.LOAD_ANONYMOUS | diff --git a/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul b/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul index fd5c2a7b0408..c94b93eab8b6 100644 --- a/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul +++ b/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul @@ -20,8 +20,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=624883