зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup. Differential Revision: https://phabricator.services.mozilla.com/D158452
This commit is contained in:
Родитель
69a9e3e717
Коммит
2ffde1e92f
|
@ -1,7 +1,7 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
var { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,13 +5,8 @@
|
|||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
});
|
||||
|
||||
|
@ -17,7 +18,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
LoginBreaches: "resource:///modules/LoginBreaches.jsm",
|
||||
LoginHelper: "resource://gre/modules/LoginHelper.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => {
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"E10SUtils",
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
});
|
||||
|
||||
export class BrowserTabChild extends JSWindowActorChild {
|
||||
constructor() {
|
||||
|
|
|
@ -7,25 +7,16 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"WebNavigationFrames",
|
||||
"resource://gre/modules/WebNavigationFrames.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"E10SUtils",
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
});
|
||||
|
||||
export class MiddleMousePasteHandlerChild extends JSWindowActorChild {
|
||||
handleEvent(clickEvent) {
|
||||
|
|
|
@ -6,18 +6,10 @@
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"E10SUtils",
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
);
|
||||
|
||||
let gContentClickListeners = new Set();
|
||||
|
||||
|
|
|
@ -8,16 +8,14 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
SearchSuggestionController:
|
||||
"resource://gre/modules/SearchSuggestionController.sys.mjs",
|
||||
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
FormHistory: "resource://gre/modules/FormHistory.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
|
||||
const MAX_LOCAL_SUGGESTIONS = 3;
|
||||
|
|
|
@ -15,18 +15,18 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ContentDOMReference: "resource://gre/modules/ContentDOMReference.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
InlineSpellCheckerContent:
|
||||
"resource://gre/modules/InlineSpellCheckerContent.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
SelectionUtils: "resource://gre/modules/SelectionUtils.sys.mjs",
|
||||
SpellCheckHelper: "resource://gre/modules/InlineSpellChecker.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
LoginManagerChild: "resource://gre/modules/LoginManagerChild.jsm",
|
||||
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
ContentDOMReference: "resource://gre/modules/ContentDOMReference.jsm",
|
||||
});
|
||||
|
||||
let contextMenus = new WeakMap();
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
export class PageInfoChild extends JSWindowActorChild {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["PluginParent", "PluginManager"];
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["RefreshBlockerChild", "RefreshBlockerObserverChild"];
|
||||
|
||||
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
const REFRESHBLOCKING_PREF = "accessibility.blockautorefresh";
|
||||
|
||||
|
|
|
@ -3,19 +3,14 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
ScreenshotsOverlayChild:
|
||||
"resource:///modules/ScreenshotsOverlayChild.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.jsm",
|
||||
});
|
||||
|
||||
export class ScreenshotsComponentChild extends JSWindowActorChild {
|
||||
receiveMessage(message) {
|
||||
switch (message.name) {
|
||||
|
|
|
@ -5,15 +5,11 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["SearchSERPTelemetryChild", "ADLINK_CHECK_TIMEOUT_MS"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
clearTimeout: "resource://gre/modules/Timer.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
const SHARED_DATA_KEY = "SearchTelemetry:ProviderInfo";
|
||||
|
|
|
@ -9,8 +9,8 @@ var EXPORTED_SYMBOLS = ["WebRTCChild"];
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
|
|
|
@ -12,11 +12,9 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"SitePermissions",
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
/* import-globals-from aboutDialog-appUpdater.js */
|
||||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
var { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
Services.scriptloader.loadSubScript(
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
var { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
|
||||
|
||||
|
@ -18,22 +18,21 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.sys.mjs",
|
||||
Color: "resource://gre/modules/Color.sys.mjs",
|
||||
|
||||
DevToolsSocketStatus:
|
||||
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
|
||||
|
||||
Deprecated: "resource://gre/modules/Deprecated.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
FirefoxViewNotificationManager:
|
||||
"resource:///modules/firefox-view-notification-manager.sys.mjs",
|
||||
|
||||
LightweightThemeConsumer:
|
||||
"resource://gre/modules/LightweightThemeConsumer.sys.mjs",
|
||||
|
||||
Log: "resource://gre/modules/Log.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
|
@ -44,10 +43,8 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
UrlbarInput: "resource:///modules/UrlbarInput.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
|
||||
UrlbarProviderSearchTips:
|
||||
"resource:///modules/UrlbarProviderSearchTips.sys.mjs",
|
||||
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
UrlbarValueFormatter: "resource:///modules/UrlbarValueFormatter.sys.mjs",
|
||||
|
@ -63,15 +60,11 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
CFRPageActions: "resource://activity-stream/lib/CFRPageActions.jsm",
|
||||
|
||||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
|
||||
Deprecated: "resource://gre/modules/Deprecated.jsm",
|
||||
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
|
@ -86,7 +79,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
PanelView: "resource:///modules/PanelMultiView.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
Pocket: "chrome://pocket/content/Pocket.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||
PromptUtils: "resource://gre/modules/SharedPromptUtils.jsm",
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
/* import-globals-from permissions.js */
|
||||
/* import-globals-from security.js */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
});
|
||||
|
||||
// Inherit color scheme overrides from parent window. This is to inherit the
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
"resource:///modules/UrlbarProviderOpenTabs.sys.mjs",
|
||||
PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
|
||||
});
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyServiceGetters(this, {
|
||||
MacSharingService: [
|
||||
"@mozilla.org/widget/macsharingservice;1",
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// Pass an empty scope object to the import to prevent "leaked window property"
|
||||
// errors in tests.
|
||||
var { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
var { Preferences } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
);
|
||||
var { TelemetryReportingPolicy } = ChromeUtils.import(
|
||||
"resource://gre/modules/TelemetryReportingPolicy.jsm"
|
||||
|
|
|
@ -2,8 +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/. */
|
||||
|
||||
var { WebChannel } = ChromeUtils.import(
|
||||
"resource://gre/modules/WebChannel.jsm"
|
||||
var { WebChannel } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/WebChannel.sys.mjs"
|
||||
);
|
||||
const { PermissionTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PermissionTestUtils.jsm"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
const OPEN_LOCATION_PREF = "browser.link.open_newwindow";
|
||||
const NON_REMOTE_PAGE = "about:welcomeback";
|
||||
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
|
||||
requestLongerTimeout(2);
|
||||
|
|
|
@ -31,8 +31,8 @@ class StartupContentSubframeChild extends JSWindowActorChild {
|
|||
|
||||
const Cm = Components.manager;
|
||||
Cm.QueryInterface(Ci.nsIServiceManager);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
let collectStacks = AppConstants.NIGHTLY_BUILD || AppConstants.DEBUG;
|
||||
|
||||
|
|
|
@ -129,8 +129,8 @@ add_task(async function() {
|
|||
/* eslint-env mozilla/frame-script */
|
||||
const Cm = Components.manager;
|
||||
Cm.QueryInterface(Ci.nsIServiceManager);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
let collectStacks = AppConstants.NIGHTLY_BUILD || AppConstants.DEBUG;
|
||||
let modules = {};
|
||||
|
|
|
@ -91,8 +91,8 @@ async function checkGeolocation(browser, frameId, expect) {
|
|||
});
|
||||
|
||||
await content.SpecialPowers.spawn(frame, [], async () => {
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
|
||||
E10SUtils.wrapHandlingUserInput(this.content, true, function() {
|
||||
|
|
|
@ -84,8 +84,8 @@ add_task(async function testTempPermissionSubframes() {
|
|||
let frame = content.document.getElementById("frame");
|
||||
|
||||
await content.SpecialPowers.spawn(frame, [host0], async function(host) {
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
|
||||
E10SUtils.wrapHandlingUserInput(this.content, true, function() {
|
||||
|
|
|
@ -13,7 +13,9 @@ try {
|
|||
);
|
||||
} catch (ex) {}
|
||||
|
||||
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
/*
|
||||
* A lightweight blocklist proxy for testing purposes.
|
||||
|
|
|
@ -19,8 +19,8 @@ const PREF_REPORT_BREAKAGE_URL = "browser.contentblocking.reportBreakage.url";
|
|||
|
||||
let { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
||||
let { CommonUtils } = ChromeUtils.import("resource://services-common/utils.js");
|
||||
let { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
let { Preferences } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
);
|
||||
|
||||
add_setup(async function() {
|
||||
|
|
|
@ -17,13 +17,9 @@
|
|||
* browser/base/content/test/sanitize/browser_sanitize-timespans.js.
|
||||
*/
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Timer",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
Timer: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
const kMsecPerMin = 60 * 1000;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const DUMMY = "browser/browser/base/content/test/siteIdentity/dummy_page.html";
|
||||
const INSECURE_ICON_PREF = "security.insecure_connection_icon.enabled";
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
function testIdentityMode(uri, expectedState, message) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const triggeringPrincipal_base64 = E10SUtils.SERIALIZED_SYSTEMPRINCIPAL;
|
||||
|
|
|
@ -6,11 +6,9 @@ XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
|
|||
return ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js");
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"WebChannel",
|
||||
"resource://gre/modules/WebChannel.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
WebChannel: "resource://gre/modules/WebChannel.sys.mjs",
|
||||
});
|
||||
|
||||
var { FxAccountsWebChannel } = ChromeUtils.import(
|
||||
"resource://gre/modules/FxAccountsWebChannel.jsm"
|
||||
|
|
|
@ -12,11 +12,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"TabStateFlusher",
|
||||
"resource:///modules/sessionstore/TabStateFlusher.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"E10SUtils",
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const triggeringPrincipal_base64 = E10SUtils.SERIALIZED_SYSTEMPRINCIPAL;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
var { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
|
@ -13,6 +13,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
|
@ -21,7 +22,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||
ExtensionSettingsStore: "resource://gre/modules/ExtensionSettingsStore.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
ShellService: "resource:///modules/ShellService.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { showStreamSharingMenu, webrtcUI } = ChromeUtils.import(
|
||||
"resource:///modules/webrtcUI.jsm"
|
||||
|
|
|
@ -10,14 +10,15 @@ var EXPORTED_SYMBOLS = [
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
FirstStartup: "resource://gre/modules/FirstStartup.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
@ -26,7 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
LaterRun: "resource:///modules/LaterRun.jsm",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
|
||||
ShellService: "resource:///modules/ShellService.jsm",
|
||||
UpdatePing: "resource://gre/modules/UpdatePing.jsm",
|
||||
|
|
|
@ -12,17 +12,20 @@ var EXPORTED_SYMBOLS = [
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActorManagerParent: "resource://gre/modules/ActorManagerParent.sys.mjs",
|
||||
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
|
||||
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
|
||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
Integration: "resource://gre/modules/Integration.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
|
@ -34,18 +37,19 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarQuickSuggest: "resource:///modules/UrlbarQuickSuggest.sys.mjs",
|
||||
WebChannel: "resource://gre/modules/WebChannel.sys.mjs",
|
||||
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
ASRouterDefaultConfig:
|
||||
"resource://activity-stream/lib/ASRouterDefaultConfig.jsm",
|
||||
|
@ -59,12 +63,10 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||
Corroborate: "resource://gre/modules/Corroborate.jsm",
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.jsm",
|
||||
Discovery: "resource:///modules/Discovery.jsm",
|
||||
DoHController: "resource:///modules/DoHController.jsm",
|
||||
DownloadsViewableInternally:
|
||||
"resource:///modules/DownloadsViewableInternally.jsm",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
|
||||
FeatureGate: "resource://featuregates/FeatureGate.jsm",
|
||||
FxAccounts: "resource://gre/modules/FxAccounts.jsm",
|
||||
|
@ -80,7 +82,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
PdfJs: "resource://pdf.js/PdfJs.jsm",
|
||||
PermissionUI: "resource:///modules/PermissionUI.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||
PublicSuffixList: "resource://gre/modules/netwerk-dns/PublicSuffixList.jsm",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.js",
|
||||
|
@ -100,7 +101,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
TelemetryUtils: "resource://gre/modules/TelemetryUtils.jsm",
|
||||
TRRRacer: "resource:///modules/TRRPerformance.jsm",
|
||||
UIState: "resource://services-sync/UIState.jsm",
|
||||
WebChannel: "resource://gre/modules/WebChannel.jsm",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
|
@ -2658,8 +2658,8 @@ BrowserGlue.prototype = {
|
|||
|
||||
{
|
||||
task: () => {
|
||||
let { setTimeout } = ChromeUtils.import(
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
let { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
setTimeout(function() {
|
||||
Services.tm.idleDispatchToMainThread(
|
||||
|
@ -5839,8 +5839,8 @@ var AboutHomeStartupCache = {
|
|||
|
||||
// To avoid hanging shutdowns, we'll ensure that we wait a maximum of
|
||||
// SHUTDOWN_CACHE_WRITE_TIMEOUT_MS millseconds before giving up.
|
||||
let { setTimeout, clearTimeout } = ChromeUtils.import(
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
let { setTimeout, clearTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
const TIMED_OUT = Symbol();
|
||||
|
|
|
@ -7,8 +7,8 @@ var EXPORTED_SYMBOLS = ["StartupRecorder"];
|
|||
const Cm = Components.manager;
|
||||
Cm.QueryInterface(Ci.nsIServiceManager);
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
let firstPaintNotification = "widget-first-paint";
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
// _AboutLogins is only exported for testing
|
||||
var EXPORTED_SYMBOLS = ["AboutLoginsParent", "_AboutLogins"];
|
||||
|
||||
const { setTimeout, clearTimeout } = ChromeUtils.import(
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
const { setTimeout, clearTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -17,8 +17,8 @@ const AttributionIOUtils = {
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
@ -27,7 +27,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource:///modules/MacAttribution.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let consoleOptions = {
|
||||
// tip: set maxLogLevel to "debug" and use lazy.log.debug() to create
|
||||
// detailed messages during development. See LOG_LEVELS in Console.jsm for
|
||||
|
|
|
@ -10,7 +10,9 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let consoleOptions = {
|
||||
// tip: set maxLogLevel to "debug" and use lazy.log.debug() to create
|
||||
// detailed messages during development. See LOG_LEVELS in Console.jsm for
|
||||
|
|
|
@ -93,8 +93,8 @@ let invalidAttrCodes = [
|
|||
*/
|
||||
async function setupStubs() {
|
||||
// Local imports to avoid polluting the global namespace.
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { sinon } = ChromeUtils.import("resource://testing-common/Sinon.jsm");
|
||||
|
||||
|
|
|
@ -8,13 +8,14 @@ var EXPORTED_SYMBOLS = ["CustomizableUI"];
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
});
|
||||
|
||||
|
@ -24,7 +25,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
SearchWidgetTracker: "resource:///modules/SearchWidgetTracker.jsm",
|
||||
CustomizableWidgets: "resource:///modules/CustomizableWidgets.jsm",
|
||||
PanelMultiView: "resource:///modules/PanelMultiView.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
});
|
||||
|
@ -196,7 +196,9 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let consoleOptions = {
|
||||
maxLogLevel: lazy.gDebuggingEnabled ? "all" : "log",
|
||||
prefix: "CustomizableUI",
|
||||
|
|
|
@ -12,11 +12,11 @@ const { CustomizableUI } = ChromeUtils.import(
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
@ -42,7 +42,9 @@ const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
|||
const kPrefScreenshots = "extensions.screenshots.disabled";
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let debug = Services.prefs.getBoolPref(kPrefCustomizationDebug, false);
|
||||
let consoleOptions = {
|
||||
maxLogLevel: debug ? "all" : "log",
|
||||
|
|
|
@ -28,8 +28,8 @@ const { CustomizableUI } = ChromeUtils.import(
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
@ -73,7 +73,9 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
|
||||
let gDebug;
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug, false);
|
||||
let consoleOptions = {
|
||||
maxLogLevel: gDebug ? "all" : "log",
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
|
|
|
@ -10,17 +10,13 @@ const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
|
|||
const PREF_CACHED_FILE_EXISTENCE = "distribution.iniFile.exists.value";
|
||||
const PREF_CACHED_FILE_APPVERSION = "distribution.iniFile.exists.appversion";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
*/
|
||||
var EXPORTED_SYMBOLS = ["DoHConfigController"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { RemoteSettings } = ChromeUtils.import(
|
||||
"resource://services-settings/remote-settings.js"
|
||||
);
|
||||
|
@ -22,13 +19,10 @@ const { RemoteSettings } = ChromeUtils.import(
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
});
|
||||
|
||||
const kGlobalPrefBranch = "doh-rollout";
|
||||
var kRegionPrefBranch;
|
||||
|
||||
|
|
|
@ -17,14 +17,17 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
|
||||
ClientID: "resource://gre/modules/ClientID.jsm",
|
||||
DoHConfigController: "resource:///modules/DoHConfig.jsm",
|
||||
Heuristics: "resource:///modules/DoHHeuristics.jsm",
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
clearTimeout: "resource://gre/modules/Timer.jsm",
|
||||
});
|
||||
|
||||
// When this is set we suppress automatic TRR selection beyond dry-run as well
|
||||
|
|
|
@ -44,11 +44,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource:///modules/DoHConfig.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
});
|
||||
|
||||
const GLOBAL_CANARY = "use-application-dns.net.";
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
});
|
||||
|
||||
|
@ -9,7 +10,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
DoHController: "resource:///modules/DoHController.jsm",
|
||||
DoHConfigController: "resource:///modules/DoHConfig.jsm",
|
||||
DoHTestUtils: "resource://testing-common/DoHTestUtils.jsm",
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
RegionTestUtils: "resource://testing-common/RegionTestUtils.jsm",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.js",
|
||||
});
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(setup);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
@ -46,7 +47,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
DownloadHistory: "resource://gre/modules/DownloadHistory.jsm",
|
||||
Downloads: "resource://gre/modules/Downloads.jsm",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
|
@ -58,7 +58,9 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "DownloadsLogger", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let consoleOptions = {
|
||||
maxLogLevelPref: "browser.download.loglevel",
|
||||
prefix: "Downloads",
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
/* import-globals-from allDownloadsView.js */
|
||||
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var ContentAreaDownloadsView = {
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
@ -46,7 +44,9 @@ let env = Cc["@mozilla.org/process/environment;1"].getService(
|
|||
const isXpcshell = env.exists("XPCSHELL_TEST_PROFILE_DIR");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
return new ConsoleAPI({
|
||||
prefix: "Policies.jsm",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
|
|
|
@ -48,7 +48,9 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
const PREF_LOGLEVEL = "browser.policies.loglevel";
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
return new ConsoleAPI({
|
||||
prefix: "BookmarksPolicies.jsm",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
|
|
|
@ -9,7 +9,9 @@ const PREF_LOGLEVEL = "browser.policies.loglevel";
|
|||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
return new ConsoleAPI({
|
||||
prefix: "ProxyPolicies.jsm",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
|
|
|
@ -33,7 +33,9 @@ const PREF_LOGLEVEL = "browser.policies.loglevel";
|
|||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
return new ConsoleAPI({
|
||||
prefix: "WebsiteFilter Policy",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
|
||||
add_setup(async function() {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
const lazy = {};
|
||||
|
||||
const { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
const { Preferences } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
);
|
||||
const { SearchSettings } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/SearchSettings.sys.mjs"
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
var { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
const REQ_LOC_CHANGE_EVENT = "intl:requested-locales-changed";
|
||||
|
||||
|
|
|
@ -19,8 +19,11 @@ XPCOMUtils.defineLazyGetter(lazy, "makeRange", () => {
|
|||
return ExtensionParent.apiManager.global.makeRange;
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -48,11 +48,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"ExtensionSettingsStore",
|
||||
"resource://gre/modules/ExtensionSettingsStore.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
let { makeWidgetId } = ExtensionCommon;
|
||||
|
||||
|
|
|
@ -26,14 +26,12 @@ ChromeUtils.defineModuleGetter(
|
|||
"ExtensionParent",
|
||||
"resource://gre/modules/ExtensionParent.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"setTimeout",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { ExtensionCommon } = ChromeUtils.import(
|
||||
"resource://gre/modules/ExtensionCommon.jsm"
|
||||
|
|
|
@ -10,20 +10,16 @@
|
|||
// modules. All of the code is installed on |global|, which is a scope
|
||||
// shared among the different ext-*.js scripts.
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserWindowTracker",
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { ExtensionError } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -11,21 +11,15 @@ ChromeUtils.defineModuleGetter(
|
|||
"CustomizableUI",
|
||||
"resource:///modules/CustomizableUI.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"clearTimeout",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ExtensionTelemetry",
|
||||
"resource://gre/modules/ExtensionTelemetry.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"setTimeout",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ViewPopup",
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
/* global tabTracker */
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { ExtensionError } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -6,14 +6,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { DefaultMap, ExtensionError, parseMatchPatterns } = ExtensionUtils;
|
||||
|
|
|
@ -21,12 +21,8 @@ ChromeUtils.defineModuleGetter(
|
|||
"ExtensionControlledPopup",
|
||||
"resource:///modules/ExtensionControlledPopup.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
|
|
@ -11,11 +11,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { ExtensionError, promiseObserved } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -8,11 +8,9 @@ requestLongerTimeout(4);
|
|||
|
||||
loadTestSubscript("head_devtools.js");
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
});
|
||||
|
||||
const DEVTOOLS_THEME_PREF = "devtools.theme";
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
/* global gBrowser SessionStore */
|
||||
"use strict";
|
||||
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
const triggeringPrincipal_base64 = E10SUtils.SERIALIZED_SYSTEMPRINCIPAL;
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ ChromeUtils.defineModuleGetter(
|
|||
"ExtensionControlledPopup",
|
||||
"resource:///modules/ExtensionControlledPopup.jsm"
|
||||
);
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
const triggeringPrincipal_base64 = E10SUtils.SERIALIZED_SYSTEMPRINCIPAL;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
const triggeringPrincipal_base64 = E10SUtils.SERIALIZED_SYSTEMPRINCIPAL;
|
||||
|
||||
|
|
|
@ -52,14 +52,14 @@ PromiseTestUtils.allowMatchingRejectionsGlobally(
|
|||
const { AppUiTestDelegate, AppUiTestInternals } = ChromeUtils.import(
|
||||
"resource://testing-common/AppUiTestDelegate.jsm"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { CustomizableUI } = ChromeUtils.import(
|
||||
"resource:///modules/CustomizableUI.jsm"
|
||||
);
|
||||
const { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
const { Preferences } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironmentBase } = ChromeUtils.import(
|
||||
"resource://gre/modules/components-utils/ClientEnvironment.jsm"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Sanitizer",
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
);
|
||||
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
let delay = () => new Promise(resolve => setTimeout(resolve, 0));
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ const INSTALLER_PREFS_BRANCH = "installer.";
|
|||
// any others will be ignored.
|
||||
const INSTALLER_PREFS_LIST = ["installer.taskbarpin.win10.enabled"];
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
|
|
|
@ -3,8 +3,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/. */
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const { InstallerPrefs } = ChromeUtils.import(
|
||||
|
|
|
@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
|
|
@ -15,8 +15,8 @@ const AUTH_TYPE = {
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { MigratorPrototype, MigrationUtils } = ChromeUtils.import(
|
||||
"resource:///modules/MigrationUtils.jsm"
|
||||
|
|
|
@ -21,7 +21,9 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
|
||||
let { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
let consoleOptions = {
|
||||
maxLogLevelPref: "browser.esedbreader.loglevel",
|
||||
prefix: "ESEDBReader",
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
const kLoginsKey =
|
||||
"Software\\Microsoft\\Internet Explorer\\IntelliForms\\Storage2";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["MSMigrationUtils"];
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { MigrationUtils } = ChromeUtils.import(
|
||||
"resource:///modules/MigrationUtils.jsm"
|
||||
|
|
|
@ -12,8 +12,8 @@ const TOPIC_DID_IMPORT_BOOKMARKS =
|
|||
"initial-migration-did-import-default-bookmarks";
|
||||
const TOPIC_PLACES_DEFAULTS_FINISHED = "places-browser-init-complete";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
@ -24,6 +24,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
ResponsivenessMonitor: "resource://gre/modules/ResponsivenessMonitor.sys.mjs",
|
||||
Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
@ -31,11 +32,6 @@ ChromeUtils.defineModuleGetter(
|
|||
"LoginHelper",
|
||||
"resource://gre/modules/LoginHelper.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"setTimeout",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
|
||||
var gMigrators = null;
|
||||
var gProfileStartup = null;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
const kIMig = Ci.nsIBrowserProfileMigrator;
|
||||
const kIPStartup = Ci.nsIProfileStartup;
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { MigrationUtils } = ChromeUtils.import(
|
||||
"resource:///modules/MigrationUtils.jsm"
|
||||
|
|
|
@ -10,8 +10,8 @@ var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
|||
var { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
var { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
var { Preferences } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
);
|
||||
var { PromiseUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PromiseUtils.sys.mjs"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { ChromeMigrationUtils } = ChromeUtils.import(
|
||||
"resource:///modules/ChromeMigrationUtils.jsm"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { CustomizableUI } = ChromeUtils.import(
|
||||
"resource:///modules/CustomizableUI.jsm"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const PROFILE = {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* importing from an empty Login Data DB.
|
||||
*/
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const PROFILE = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
|
|
@ -33,11 +33,11 @@ const EXPORTED_SYMBOLS = [
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { E10SUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/E10SUtils.jsm"
|
||||
const { E10SUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["AboutWelcomeDefaults", "DEFAULT_WELCOME_CONTENT"];
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче