Bug 1792365 - Convert various toolkit/modules files to system ES modules. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D158093
This commit is contained in:
Mark Banner
2022-09-29 06:52:33 +00:00
parent a56c7d9f34
commit 94440c5a3a
62 changed files with 182 additions and 413 deletions

View File

@@ -60,12 +60,12 @@ const startupPhases = {
"resource:///modules/BrowserUsageTelemetry.jsm", "resource:///modules/BrowserUsageTelemetry.jsm",
"resource:///modules/ContentCrashHandlers.jsm", "resource:///modules/ContentCrashHandlers.jsm",
"resource:///modules/ShellService.jsm", "resource:///modules/ShellService.jsm",
"resource://gre/modules/NewTabUtils.jsm", "resource://gre/modules/NewTabUtils.sys.mjs",
"resource://gre/modules/PageThumbs.jsm", "resource://gre/modules/PageThumbs.jsm",
"resource://gre/modules/PlacesUtils.sys.mjs", "resource://gre/modules/PlacesUtils.sys.mjs",
"resource://gre/modules/Preferences.jsm", "resource://gre/modules/Preferences.jsm",
"resource://gre/modules/SearchService.sys.mjs", "resource://gre/modules/SearchService.sys.mjs",
"resource://gre/modules/Sqlite.jsm", "resource://gre/modules/Sqlite.sys.mjs",
]), ]),
services: new Set(["@mozilla.org/browser/search-service;1"]), services: new Set(["@mozilla.org/browser/search-service;1"]),
}, },
@@ -100,7 +100,7 @@ const startupPhases = {
"before becoming idle": { "before becoming idle": {
denylist: { denylist: {
modules: new Set([ modules: new Set([
"resource://gre/modules/AsyncPrefs.jsm", "resource://gre/modules/AsyncPrefs.sys.mjs",
"resource://gre/modules/LoginManagerContextMenu.jsm", "resource://gre/modules/LoginManagerContextMenu.jsm",
"resource://gre/modules/osfile.jsm", "resource://gre/modules/osfile.jsm",
"resource://pdf.js/PdfStreamConverter.jsm", "resource://pdf.js/PdfStreamConverter.jsm",

View File

@@ -29,7 +29,7 @@ const known_scripts = {
"resource://gre/modules/XPCOMUtils.sys.mjs", "resource://gre/modules/XPCOMUtils.sys.mjs",
// Logging related // Logging related
"resource://gre/modules/Log.jsm", "resource://gre/modules/Log.sys.mjs",
// Browser front-end // Browser front-end
"resource:///actors/AboutReaderChild.sys.mjs", "resource:///actors/AboutReaderChild.sys.mjs",

View File

@@ -42,7 +42,7 @@ const known_scripts = {
"resource://gre/modules/XPCOMUtils.sys.mjs", "resource://gre/modules/XPCOMUtils.sys.mjs",
// Logging related // Logging related
"resource://gre/modules/Log.jsm", "resource://gre/modules/Log.sys.mjs",
// Browser front-end // Browser front-end
"resource:///actors/PageStyleChild.jsm", "resource:///actors/PageStyleChild.jsm",

View File

@@ -46,7 +46,7 @@ const TEST_CASES = [
}, },
{ {
type: "resource", type: "resource",
testURL: "resource://gre/modules/Log.jsm", testURL: "resource://gre/modules/Log.sys.mjs",
img_url: `url("chrome://global/skin/icons/page-portrait.svg")`, img_url: `url("chrome://global/skin/icons/page-portrait.svg")`,
}, },
{ {

View File

@@ -35,7 +35,7 @@ const backgroundtaskPhases = {
"resource://gre/modules/Console.jsm", "resource://gre/modules/Console.jsm",
"resource://gre/modules/EnterprisePolicies.sys.mjs", "resource://gre/modules/EnterprisePolicies.sys.mjs",
"resource://gre/modules/EnterprisePoliciesParent.sys.mjs", "resource://gre/modules/EnterprisePoliciesParent.sys.mjs",
"resource://gre/modules/PromiseUtils.jsm", "resource://gre/modules/PromiseUtils.sys.mjs",
"resource://gre/modules/XPCOMUtils.sys.mjs", "resource://gre/modules/XPCOMUtils.sys.mjs",
"resource://gre/modules/nsAsyncShutdown.jsm", "resource://gre/modules/nsAsyncShutdown.jsm",
], ],

View File

@@ -4,15 +4,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const EXPORTED_SYMBOLS = ["AboutPagesUtils"]; export const AboutPagesUtils = {};
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const AboutPagesUtils = {};
XPCOMUtils.defineLazyGetter(AboutPagesUtils, "visibleAboutUrls", () => { XPCOMUtils.defineLazyGetter(AboutPagesUtils, "visibleAboutUrls", () => {
const urls = []; const urls = [];

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["AppMenuNotifications"];
function AppMenuNotification(id, mainAction, secondaryAction, options = {}) { function AppMenuNotification(id, mainAction, secondaryAction, options = {}) {
this.id = id; this.id = id;
this.mainAction = mainAction; this.mainAction = mainAction;
@@ -14,7 +10,7 @@ function AppMenuNotification(id, mainAction, secondaryAction, options = {}) {
this.dismissed = this.options.dismissed || false; this.dismissed = this.options.dismissed || false;
} }
var AppMenuNotifications = { export var AppMenuNotifications = {
_notifications: [], _notifications: [],
_hasInitialized: false, _hasInitialized: false,

View File

@@ -3,11 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["AsanReporter"]; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -34,7 +31,7 @@ const LOGGER_NAME = "asanreporter";
let logger; let logger;
const AsanReporter = { export const AsanReporter = {
init() { init() {
if (this.initialized) { if (this.initialized) {
return; return;

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["AsyncPrefs", "AsyncPrefsChild", "AsyncPrefsParent"];
const kInChildProcess = const kInChildProcess =
Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT; Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
@@ -93,7 +89,7 @@ function maybeReturnErrorForSet(pref, value) {
return false; return false;
} }
class AsyncPrefsChild extends JSProcessActorChild { export class AsyncPrefsChild extends JSProcessActorChild {
set(pref, value) { set(pref, value) {
let error = maybeReturnErrorForSet(pref, value); let error = maybeReturnErrorForSet(pref, value);
if (error) { if (error) {
@@ -116,7 +112,7 @@ class AsyncPrefsChild extends JSProcessActorChild {
} }
} }
var AsyncPrefs = { export var AsyncPrefs = {
set(pref, value) { set(pref, value) {
if (kInChildProcess) { if (kInChildProcess) {
return ChromeUtils.domProcessChild return ChromeUtils.domProcessChild
@@ -140,7 +136,7 @@ const methodForType = {
string: "setCharPref", string: "setCharPref",
}; };
class AsyncPrefsParent extends JSProcessActorParent { export class AsyncPrefsParent extends JSProcessActorParent {
static set(pref, value) { static set(pref, value) {
let error = maybeReturnErrorForSet(pref, value); let error = maybeReturnErrorForSet(pref, value);
if (error) { if (error) {

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var BinarySearch = Object.freeze({
var EXPORTED_SYMBOLS = ["BinarySearch"];
var BinarySearch = Object.freeze({
/** /**
* Returns the index of the given target in the given array or -1 if the * Returns the index of the given target in the given array or -1 if the
* target is not found. * target is not found.

View File

@@ -3,13 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["BrowserTelemetryUtils"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -62,7 +56,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
0 0
); );
var BrowserTelemetryUtils = { export var BrowserTelemetryUtils = {
recordSiteOriginTelemetry(aWindows, aIsGeckoView) { recordSiteOriginTelemetry(aWindows, aIsGeckoView) {
Services.tm.idleDispatchToMainThread(() => { Services.tm.idleDispatchToMainThread(() => {
this._recordSiteOriginTelemetry(aWindows, aIsGeckoView); this._recordSiteOriginTelemetry(aWindows, aIsGeckoView);

View File

@@ -3,16 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["BrowserUtils"];
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
const { XPCOMUtils } = ChromeUtils.importESModule( import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
Region: "resource://gre/modules/Region.sys.mjs", Region: "resource://gre/modules/Region.sys.mjs",
@@ -42,7 +37,7 @@ function stringPrefToSet(prefVal) {
); );
} }
var BrowserUtils = { export var BrowserUtils = {
/** /**
* Return or create a principal with the content of one, and the originAttributes * Return or create a principal with the content of one, and the originAttributes
* of an existing principal (e.g. on a docshell, where the originAttributes ought * of an existing principal (e.g. on a docshell, where the originAttributes ought

View File

@@ -2,8 +2,6 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CertUtils"];
const Ce = Components.Exception; const Ce = Components.Exception;
/** /**
@@ -222,7 +220,7 @@ BadCertHandler.prototype = {
]), ]),
}; };
var CertUtils = { export var CertUtils = {
BadCertHandler, BadCertHandler,
checkCert, checkCert,
readCertPrefs, readCertPrefs,

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["Color"];
/** /**
* A list of minimum contrast ratio's per WCAG 2.0 conformance level. * A list of minimum contrast ratio's per WCAG 2.0 conformance level.
* Please refer to section 1.4.3 of the WCAG 2.0 spec at http://www.w3.org/TR/WCAG20/. * Please refer to section 1.4.3 of the WCAG 2.0 spec at http://www.w3.org/TR/WCAG20/.
@@ -42,7 +38,7 @@ const CONTRAST_BRIGHTTEXT_THRESHOLD = Math.sqrt(1.05 * 0.05) - 0.05;
* @param {Number} g Green color component * @param {Number} g Green color component
* @param {Number} b Blue color component * @param {Number} b Blue color component
*/ */
class Color { export class Color {
constructor(r, g, b) { constructor(r, g, b) {
this.r = r; this.r = r;
this.g = g; this.g = g;

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["CreditCard", "NETWORK_NAMES"];
// The list of known and supported credit card network ids ("types") // The list of known and supported credit card network ids ("types")
// This list mirrors the networks from dom/payments/BasicCardPayment.cpp // This list mirrors the networks from dom/payments/BasicCardPayment.cpp
// and is defined by https://www.w3.org/Payments/card-network-ids // and is defined by https://www.w3.org/Payments/card-network-ids
@@ -23,7 +19,7 @@ const SUPPORTED_NETWORKS = Object.freeze([
// This lists stores lower cased variations of popular credit card network // This lists stores lower cased variations of popular credit card network
// names for matching against strings. // names for matching against strings.
const NETWORK_NAMES = { export const NETWORK_NAMES = {
"american express": "amex", "american express": "amex",
"master card": "mastercard", "master card": "mastercard",
"union pay": "unionpay", "union pay": "unionpay",
@@ -62,7 +58,7 @@ const CREDIT_CARD_IIN = [
{ type: "visa", start: 4, end: 4, len: 16 }, { type: "visa", start: 4, end: 4, len: 16 },
].sort((a, b) => b.start - a.start); ].sort((a, b) => b.start - a.start);
class CreditCard { export class CreditCard {
/** /**
* A CreditCard object represents a credit card, with * A CreditCard object represents a credit card, with
* number, name, expiration, network, and CCV. * number, name, expiration, network, and CCV.

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var DateTimePickerPanel = class {
var EXPORTED_SYMBOLS = ["DateTimePickerPanel"];
var DateTimePickerPanel = class {
constructor(element) { constructor(element) {
this.element = element; this.element = element;

View File

@@ -3,8 +3,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["FileUtils"];
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
@@ -13,7 +11,7 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/Deprecated.jsm" "resource://gre/modules/Deprecated.jsm"
); );
var FileUtils = { export var FileUtils = {
MODE_RDONLY: 0x01, MODE_RDONLY: 0x01,
MODE_WRONLY: 0x02, MODE_WRONLY: 0x02,
MODE_RDWR: 0x04, MODE_RDWR: 0x04,

View File

@@ -2,20 +2,15 @@
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
"use strict";
var EXPORTED_SYMBOLS = ["FindBarContent"]; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
/* Please keep in sync with toolkit/content/widgets/findbar.js */ /* Please keep in sync with toolkit/content/widgets/findbar.js */
const FIND_NORMAL = 0; const FIND_NORMAL = 0;
const FIND_TYPEAHEAD = 1; const FIND_TYPEAHEAD = 1;
const FIND_LINKS = 2; const FIND_LINKS = 2;
class FindBarContent { export class FindBarContent {
constructor(actor) { constructor(actor) {
this.actor = actor; this.actor = actor;

View File

@@ -3,15 +3,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
var EXPORTED_SYMBOLS = [ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"Finder",
"GetClipboardSearchString",
"SetClipboardSearchString",
];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { Rect } = ChromeUtils.import("resource://gre/modules/Geometry.jsm"); const { Rect } = ChromeUtils.import("resource://gre/modules/Geometry.jsm");
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
@@ -44,7 +37,7 @@ const kMatchesCountLimitPref = "accessibility.typeaheadfind.matchesCountLimit";
const activeFinderRoots = new WeakSet(); const activeFinderRoots = new WeakSet();
function Finder(docShell) { export function Finder(docShell) {
this._fastFind = Cc["@mozilla.org/typeaheadfind;1"].createInstance( this._fastFind = Cc["@mozilla.org/typeaheadfind;1"].createInstance(
Ci.nsITypeAheadFind Ci.nsITypeAheadFind
); );
@@ -822,7 +815,7 @@ Finder.prototype = {
]), ]),
}; };
function GetClipboardSearchString(aLoadContext) { export function GetClipboardSearchString(aLoadContext) {
let searchString = ""; let searchString = "";
if (!Services.clipboard.supportsFindClipboard()) { if (!Services.clipboard.supportsFindClipboard()) {
return searchString; return searchString;
@@ -848,7 +841,7 @@ function GetClipboardSearchString(aLoadContext) {
return searchString; return searchString;
} }
function SetClipboardSearchString(aSearchString) { export function SetClipboardSearchString(aSearchString) {
if (!aSearchString || !Services.clipboard.supportsFindClipboard()) { if (!aSearchString || !Services.clipboard.supportsFindClipboard()) {
return; return;
} }

View File

@@ -2,13 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["FinderHighlighter"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -176,7 +170,7 @@ let gWindows = new WeakMap();
* @param {boolean} useTop check and use top-level windows for rectangle * @param {boolean} useTop check and use top-level windows for rectangle
* computation, if possible. * computation, if possible.
*/ */
function FinderHighlighter(finder, useTop = false) { export function FinderHighlighter(finder, useTop = false) {
this._highlightAll = Services.prefs.getBoolPref(kHighlightAllPref); this._highlightAll = Services.prefs.getBoolPref(kHighlightAllPref);
this._modal = Services.prefs.getBoolPref(kModalHighlightPref); this._modal = Services.prefs.getBoolPref(kModalHighlightPref);
this._useSubFrames = false; this._useSubFrames = false;

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["FinderIterator"];
const { clearTimeout, setTimeout } = ChromeUtils.import( const { clearTimeout, setTimeout } = ChromeUtils.import(
"resource://gre/modules/Timer.jsm" "resource://gre/modules/Timer.jsm"
); );
@@ -27,7 +23,7 @@ const kTimeoutPref = "findbar.iteratorTimeout";
* FinderIterator. See the documentation for the `start()` method to * FinderIterator. See the documentation for the `start()` method to
* learn more. * learn more.
*/ */
function FinderIterator() { export function FinderIterator() {
this._listeners = new Map(); this._listeners = new Map();
this._currentParams = null; this._currentParams = null;
this._catchingUp = new Set(); this._catchingUp = new Set();

View File

@@ -4,15 +4,11 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
var EXPORTED_SYMBOLS = ["FinderParent"];
const kModalHighlightPref = "findbar.modalHighlight"; const kModalHighlightPref = "findbar.modalHighlight";
const kSoundEnabledPref = "accessibility.typeaheadfind.enablesound"; const kSoundEnabledPref = "accessibility.typeaheadfind.enablesound";
const kNotFoundSoundPref = "accessibility.typeaheadfind.soundURL"; const kNotFoundSoundPref = "accessibility.typeaheadfind.soundURL";
const { XPCOMUtils } = ChromeUtils.importESModule( import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -51,7 +47,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
"" ""
); );
function FinderParent(browser) { export function FinderParent(browser) {
this._listeners = new Set(); this._listeners = new Set();
this._searchString = ""; this._searchString = "";
this._foundSearchString = null; this._foundSearchString = null;

View File

@@ -2,14 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["FirstStartup"];
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
const { XPCOMUtils } = ChromeUtils.importESModule( import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -29,7 +25,7 @@ const PREF_TIMEOUT = "first-startup.timeout";
* In this scenario, the installer does not exit until the first application window appears, * In this scenario, the installer does not exit until the first application window appears,
* which gives the user experience of the application starting up quickly on first install. * which gives the user experience of the application starting up quickly on first install.
*/ */
var FirstStartup = { export var FirstStartup = {
NOT_STARTED: 0, NOT_STARTED: 0,
IN_PROGRESS: 1, IN_PROGRESS: 1,
TIMED_OUT: 2, TIMED_OUT: 2,

View File

@@ -2,20 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["FormLikeFactory"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
/** /**
* A factory to generate FormLike objects that represent a set of related fields * A factory to generate FormLike objects that represent a set of related fields
* which aren't necessarily marked up with a <form> element. FormLike's emulate * which aren't necessarily marked up with a <form> element. FormLike's emulate
* the properties of an HTMLFormElement which are relevant to form tasks. * the properties of an HTMLFormElement which are relevant to form tasks.
*/ */
let FormLikeFactory = { export let FormLikeFactory = {
_propsFromForm: ["action", "autocomplete", "ownerDocument"], _propsFromForm: ["action", "autocomplete", "ownerDocument"],
/** /**

View File

@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// 1 day default // 1 day default
const DEFAULT_SECONDS_BETWEEN_CHECKS = 60 * 60 * 24; const DEFAULT_SECONDS_BETWEEN_CHECKS = 60 * 60 * 24;
@@ -18,13 +16,6 @@ const { ProductAddonChecker } = ChromeUtils.import(
"resource://gre/modules/addons/ProductAddonChecker.jsm" "resource://gre/modules/addons/ProductAddonChecker.jsm"
); );
var EXPORTED_SYMBOLS = [
"GMPInstallManager",
"GMPExtractor",
"GMPDownloader",
"GMPAddon",
];
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
@@ -141,7 +132,8 @@ function downloadLocalConfig() {
/** /**
* Provides an easy API for downloading and installing GMP Addons * Provides an easy API for downloading and installing GMP Addons
*/ */
function GMPInstallManager() {} export function GMPInstallManager() {}
/** /**
* Temp file name used for downloading * Temp file name used for downloading
*/ */
@@ -599,7 +591,7 @@ GMPInstallManager.prototype = {
* *
* @param addon The ProductAddonChecker `addon` object * @param addon The ProductAddonChecker `addon` object
*/ */
function GMPAddon(addon) { export function GMPAddon(addon) {
let log = getScopedLogger("GMPAddon.constructor"); let log = getScopedLogger("GMPAddon.constructor");
for (let name of Object.keys(addon)) { for (let name of Object.keys(addon)) {
this[name] = addon[name]; this[name] = addon[name];
@@ -664,6 +656,7 @@ GMPAddon.prototype = {
); );
}, },
}; };
/** /**
* Constructs a GMPExtractor object which is used to extract a GMP zip * Constructs a GMPExtractor object which is used to extract a GMP zip
* into the specified location. * into the specified location.
@@ -671,10 +664,11 @@ GMPAddon.prototype = {
* @param relativePath The relative path components inside the profile directory * @param relativePath The relative path components inside the profile directory
* to extract the zip to. * to extract the zip to.
*/ */
function GMPExtractor(zipPath, relativeInstallPath) { export function GMPExtractor(zipPath, relativeInstallPath) {
this.zipPath = zipPath; this.zipPath = zipPath;
this.relativeInstallPath = relativeInstallPath; this.relativeInstallPath = relativeInstallPath;
} }
GMPExtractor.prototype = { GMPExtractor.prototype = {
/** /**
* Installs the this.zipPath contents into the directory used to store GMP * Installs the this.zipPath contents into the directory used to store GMP
@@ -717,7 +711,7 @@ GMPExtractor.prototype = {
* the specified GMPAddon object. * the specified GMPAddon object.
* @param gmpAddon The addon to install. * @param gmpAddon The addon to install.
*/ */
function GMPDownloader(gmpAddon) { export function GMPDownloader(gmpAddon) {
this._gmpAddon = gmpAddon; this._gmpAddon = gmpAddon;
} }

View File

@@ -2,16 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = [
"GMP_PLUGIN_IDS",
"GMPPrefs",
"GMPUtils",
"OPEN_H264_ID",
"WIDEVINE_ID",
];
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -23,11 +13,12 @@ ChromeUtils.defineModuleGetter(
); );
// GMP IDs // GMP IDs
const OPEN_H264_ID = "gmp-gmpopenh264"; export const OPEN_H264_ID = "gmp-gmpopenh264";
const WIDEVINE_ID = "gmp-widevinecdm";
const GMP_PLUGIN_IDS = [OPEN_H264_ID, WIDEVINE_ID];
var GMPUtils = { export const WIDEVINE_ID = "gmp-widevinecdm";
export const GMP_PLUGIN_IDS = [OPEN_H264_ID, WIDEVINE_ID];
export var GMPUtils = {
/** /**
* Checks whether or not a given plugin is hidden. Hidden plugins are neither * Checks whether or not a given plugin is hidden. Hidden plugins are neither
* downloaded nor displayed in the addons manager. * downloaded nor displayed in the addons manager.
@@ -118,7 +109,7 @@ var GMPUtils = {
/** /**
* Manages preferences for GMP addons * Manages preferences for GMP addons
*/ */
var GMPPrefs = { export var GMPPrefs = {
KEY_EME_ENABLED: "media.eme.enabled", KEY_EME_ENABLED: "media.eme.enabled",
KEY_PLUGIN_ENABLED: "media.{0}.enabled", KEY_PLUGIN_ENABLED: "media.{0}.enabled",
KEY_PLUGIN_LAST_DOWNLOAD: "media.{0}.lastDownload", KEY_PLUGIN_LAST_DOWNLOAD: "media.{0}.lastDownload",

View File

@@ -2,14 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["Point", "Rect"];
/** /**
* Simple Point class. * Simple Point class.
* *
* Any method that takes an x and y may also take a point. * Any method that takes an x and y may also take a point.
*/ */
function Point(x, y) { export function Point(x, y) {
this.set(x, y); this.set(x, y);
} }
@@ -84,7 +82,7 @@ Point.prototype = {
* non-positive widths and heights in that case. * non-positive widths and heights in that case.
*/ */
function Rect(x, y, w, h) { export function Rect(x, y, w, h) {
this.left = x; this.left = x;
this.top = y; this.top = y;
this.right = x + w; this.right = x + w;

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["HiddenFrame"];
const { PromiseUtils } = ChromeUtils.import( const { PromiseUtils } = ChromeUtils.import(
"resource://gre/modules/PromiseUtils.jsm" "resource://gre/modules/PromiseUtils.jsm"
); );
@@ -30,7 +26,7 @@ function ensureCleanupRegistered() {
* An hidden frame object. It takes care of creating a windowless browser and * An hidden frame object. It takes care of creating a windowless browser and
* passing the window containing a blank XUL <window> back. * passing the window containing a blank XUL <window> back.
*/ */
function HiddenFrame() {} export function HiddenFrame() {}
HiddenFrame.prototype = { HiddenFrame.prototype = {
_frame: null, _frame: null,

View File

@@ -2,12 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["httpRequest", "percentEncode"];
// Strictly follow RFC 3986 when encoding URI components. // Strictly follow RFC 3986 when encoding URI components.
// Accepts a unescaped string and returns the URI encoded string for use in // Accepts a unescaped string and returns the URI encoded string for use in
// an HTTP request. // an HTTP request.
function percentEncode(aString) { export function percentEncode(aString) {
return encodeURIComponent(aString) return encodeURIComponent(aString)
.replace(/[!'()]/g, escape) .replace(/[!'()]/g, escape)
.replace(/\*/g, "%2A"); .replace(/\*/g, "%2A");
@@ -31,7 +29,7 @@ function percentEncode(aString) {
* array the first value is the key and the second is the value, e.g. * array the first value is the key and the second is the value, e.g.
* [["key1", "value1"], ["key2", "value2"]]. * [["key1", "value1"], ["key2", "value2"]].
*/ */
function httpRequest(aUrl, aOptions) { export function httpRequest(aUrl, aOptions) {
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
xhr.mozBackgroundRequest = true; // no error dialogs xhr.mozBackgroundRequest = true; // no error dialogs
xhr.open(aOptions.method || (aOptions.postData ? "POST" : "GET"), aUrl); xhr.open(aOptions.method || (aOptions.postData ? "POST" : "GET"), aUrl);

View File

@@ -3,7 +3,6 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/** /**
* @file * @file
@@ -13,8 +12,6 @@
*/ */
/* exported IndexedDB */ /* exported IndexedDB */
var EXPORTED_SYMBOLS = ["IndexedDB"];
/** /**
* Wraps the given request object, and returns a Promise which resolves when * Wraps the given request object, and returns a Promise which resolves when
* the requests succeeds or rejects when it fails. * the requests succeeds or rejects when it fails.
@@ -278,7 +275,7 @@ forwardGetters(Transaction, "transaction", [
forwardMethods(Transaction, "transaction", ["abort"]); forwardMethods(Transaction, "transaction", ["abort"]);
class IndexedDB { export class IndexedDB {
/** /**
* Opens the database with the given name, and returns a Promise which * Opens the database with the given name, and returns a Promise which
* resolves to an IndexedDB instance when the operation completes. * resolves to an IndexedDB instance when the operation completes.

View File

@@ -2,10 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["InlineSpellChecker", "SpellCheckHelper"];
const MAX_UNDO_STACK_DEPTH = 1; const MAX_UNDO_STACK_DEPTH = 1;
function InlineSpellChecker(aEditor) { export function InlineSpellChecker(aEditor) {
this.init(aEditor); this.init(aEditor);
this.mAddedWordStack = []; // We init this here to preserve it between init/uninit calls this.mAddedWordStack = []; // We init this here to preserve it between init/uninit calls
} }
@@ -391,7 +390,7 @@ InlineSpellChecker.prototype = {
}, },
}; };
var SpellCheckHelper = { export var SpellCheckHelper = {
// Set when over a non-read-only <textarea> or editable <input> // Set when over a non-read-only <textarea> or editable <input>
// (that allows text entry of some kind, so not e.g. <input type=checkbox>) // (that allows text entry of some kind, so not e.g. <input type=checkbox>)
EDITABLE: 0x1, EDITABLE: 0x1,

View File

@@ -3,15 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var { InlineSpellChecker, SpellCheckHelper } = ChromeUtils.import( var { InlineSpellChecker, SpellCheckHelper } = ChromeUtils.import(
"resource://gre/modules/InlineSpellChecker.jsm" "resource://gre/modules/InlineSpellChecker.jsm"
); );
var EXPORTED_SYMBOLS = ["InlineSpellCheckerContent"]; export var InlineSpellCheckerContent = {
var InlineSpellCheckerContent = {
_spellChecker: null, _spellChecker: null,
_actor: null, _actor: null,

View File

@@ -104,13 +104,7 @@
* reference changes when new integration overrides are registered. * reference changes when new integration overrides are registered.
*/ */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["Integration"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
/** /**
* Maps integration point names to IntegrationPoint objects. * Maps integration point names to IntegrationPoint objects.
@@ -124,7 +118,7 @@ const gIntegrationPoints = new Map();
* Integration.downloads.register(...); * Integration.downloads.register(...);
* Integration["addon-provided-integration"].register(...); * Integration["addon-provided-integration"].register(...);
*/ */
var Integration = new Proxy( export var Integration = new Proxy(
{}, {},
{ {
get(target, name) { get(target, name) {

View File

@@ -26,15 +26,9 @@
* The file is stored in JSON format, without indentation, using UTF-8 encoding. * The file is stored in JSON format, without indentation, using UTF-8 encoding.
*/ */
"use strict";
var EXPORTED_SYMBOLS = ["JSONFile"];
// Globals // Globals
const { XPCOMUtils } = ChromeUtils.importESModule( import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -107,7 +101,7 @@ const TELEMETRY_BASENAMES = new Set(["logins", "autofillprofiles"]);
* up json files in load() and ensureDataReady() when original * up json files in load() and ensureDataReady() when original
* files are missing or corrupt. * files are missing or corrupt.
*/ */
function JSONFile(config) { export function JSONFile(config) {
this.path = config.path; this.path = config.path;
if (typeof config.dataPostProcessor === "function") { if (typeof config.dataPostProcessor === "function") {

View File

@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/** /**
* A facade around @cfworker/json-schema that provides additional formats and * A facade around @cfworker/json-schema that provides additional formats and
* convenience methods whil executing inside a sandbox. * convenience methods whil executing inside a sandbox.
@@ -171,10 +169,8 @@ function detectSchemaDraft(schema, defaultDraft = "2019-09") {
} }
} }
const JsonSchema = { export const JsonSchema = {
Validator, Validator,
validate, validate,
detectSchemaDraft, detectSchemaDraft,
}; };
const EXPORTED_SYMBOLS = ["JsonSchema"];

View File

@@ -3,17 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["KeywordUtils"];
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
}); });
var KeywordUtils = { export var KeywordUtils = {
/** /**
* Replaces %s or %S in the provided url or postData with the given parameter, * Replaces %s or %S in the provided url or postData with the given parameter,
* acccording to the best charset for the given url. * acccording to the best charset for the given url.

View File

@@ -3,11 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var LayoutUtils = {
var EXPORTED_SYMBOLS = ["LayoutUtils"];
var LayoutUtils = {
/** /**
* For a given DOM element, returns its position in screen coordinates * For a given DOM element, returns its position in screen coordinates
* (<https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#screen>). * (<https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#screen>).

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["LightweightThemeConsumer"]; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
@@ -194,7 +190,7 @@ const toolkitVariableMap = [
], ],
]; ];
function LightweightThemeConsumer(aDocument) { export function LightweightThemeConsumer(aDocument) {
this._doc = aDocument; this._doc = aDocument;
this._win = aDocument.defaultView; this._win = aDocument.defaultView;
this._winId = this._win.docShell.outerWindowID; this._winId = this._win.docShell.outerWindowID;

View File

@@ -2,13 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; // TODO: Bug 1792404 - this needs to stay using `importESModule` until the bug
// is fixed, otherwise browser_startup_content*.js will fail.
var EXPORTED_SYMBOLS = ["Log"];
const { XPCOMUtils } = ChromeUtils.importESModule( const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs" "resource://gre/modules/XPCOMUtils.sys.mjs"
); );
const INTERNAL_FIELDS = new Set(["_level", "_message", "_time", "_namespace"]); const INTERNAL_FIELDS = new Set(["_level", "_message", "_time", "_namespace"]);
/* /*
@@ -19,7 +18,7 @@ function dumpError(text) {
Cu.reportError(text); Cu.reportError(text);
} }
var Log = { export var Log = {
Level: { Level: {
Fatal: 70, Fatal: 70,
Error: 60, Error: 60,

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["NLP"];
/** /**
* NLP, which stands for Natural Language Processing, is a module that provides * NLP, which stands for Natural Language Processing, is a module that provides
* an entry point to various methods to interface with human language. * an entry point to various methods to interface with human language.
@@ -13,7 +9,7 @@ var EXPORTED_SYMBOLS = ["NLP"];
* At least, that's the goal. Eventually. Right now, the find toolbar only really * At least, that's the goal. Eventually. Right now, the find toolbar only really
* needs the Levenshtein distance algorithm. * needs the Levenshtein distance algorithm.
*/ */
var NLP = { export var NLP = {
/** /**
* Calculate the Levenshtein distance between two words. * Calculate the Levenshtein distance between two words.
* The implementation of this method was heavily inspired by * The implementation of this method was heavily inspired by

View File

@@ -2,13 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["NewTabUtils"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
// Android tests don't import these properly, so guard against that // Android tests don't import these properly, so guard against that
let shortURL = {}; let shortURL = {};
@@ -2295,7 +2289,7 @@ var ExpirationFilter = {
/** /**
* Singleton that provides the public API of this JSM. * Singleton that provides the public API of this JSM.
*/ */
var NewTabUtils = { export var NewTabUtils = {
_initialized: false, _initialized: false,
/** /**

View File

@@ -6,13 +6,7 @@
* Helpers for using OS Key Store. * Helpers for using OS Key Store.
*/ */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["OSKeyStore"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
@@ -39,7 +33,7 @@ XPCOMUtils.defineLazyServiceGetter(
// Skip reauth during tests, only works in non-official builds. // Skip reauth during tests, only works in non-official builds.
const TEST_ONLY_REAUTH = "toolkit.osKeyStore.unofficialBuildOnlyLogin"; const TEST_ONLY_REAUTH = "toolkit.osKeyStore.unofficialBuildOnlyLogin";
var OSKeyStore = { export var OSKeyStore = {
/** /**
* On macOS this becomes part of the name label visible on Keychain Acesss as * On macOS this becomes part of the name label visible on Keychain Acesss as
* "Firefox Encrypted Storage" (where "Firefox" is the MOZ_APP_BASENAME). * "Firefox Encrypted Storage" (where "Firefox" is the MOZ_APP_BASENAME).

View File

@@ -3,13 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["OsEnvironment"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -22,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
"resource://gre/modules/components-utils/WindowsVersionInfo.jsm", "resource://gre/modules/components-utils/WindowsVersionInfo.jsm",
}); });
let OsEnvironment = { export let OsEnvironment = {
/** /**
* This is a policy object used to override behavior for testing. * This is a policy object used to override behavior for testing.
*/ */

View File

@@ -2,8 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
var EXPORTED_SYMBOLS = ["PermissionsUtils", "PermissionsTestUtils"];
var gImportedPrefBranches = new Set(); var gImportedPrefBranches = new Set();
function importPrefBranch(aPrefBranch, aPermission, aAction) { function importPrefBranch(aPrefBranch, aPermission, aAction) {
@@ -52,7 +50,7 @@ function importPrefBranch(aPrefBranch, aPermission, aAction) {
} }
} }
var PermissionsUtils = { export var PermissionsUtils = {
/** /**
* Import permissions from perferences to the Permissions Manager. After being * Import permissions from perferences to the Permissions Manager. After being
* imported, all processed permissions will be set to an empty string. * imported, all processed permissions will be set to an empty string.
@@ -102,7 +100,7 @@ var PermissionsUtils = {
}; };
// For test use only. // For test use only.
const PermissionsTestUtils = { export const PermissionsTestUtils = {
clearImportedPrefBranches() { clearImportedPrefBranches() {
gImportedPrefBranches.clear(); gImportedPrefBranches.clear();
}, },

View File

@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["PopupNotifications"];
const { PrivateBrowsingUtils } = ChromeUtils.import( const { PrivateBrowsingUtils } = ChromeUtils.import(
"resource://gre/modules/PrivateBrowsingUtils.jsm" "resource://gre/modules/PrivateBrowsingUtils.jsm"
); );
@@ -219,7 +217,7 @@ Notification.prototype = {
* and when the "anchorVisibilityChange" method is called. * and when the "anchorVisibilityChange" method is called.
* } * }
*/ */
function PopupNotifications(tabbrowser, panel, iconBox, options = {}) { export function PopupNotifications(tabbrowser, panel, iconBox, options = {}) {
if (!tabbrowser) { if (!tabbrowser) {
throw new Error("Invalid tabbrowser"); throw new Error("Invalid tabbrowser");
} }

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export const ProcessType = Object.freeze({
const EXPORTED_SYMBOLS = ["ProcessType"];
const ProcessType = Object.freeze({
/** /**
* Converts a key string to a fluent ID defined in processTypes.ftl. * Converts a key string to a fluent ID defined in processTypes.ftl.
*/ */

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["ProfileAge"];
const { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm"); const { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm");
const FILE_TIMES = "times.json"; const FILE_TIMES = "times.json";
@@ -191,7 +187,7 @@ async function initProfileAge(profile) {
* @param {string} profile The path to the profile directory. * @param {string} profile The path to the profile directory.
* @return {Promise<ProfileAgeImpl>} Resolves to the ProfileAgeImpl. * @return {Promise<ProfileAgeImpl>} Resolves to the ProfileAgeImpl.
*/ */
function ProfileAge(profile) { export function ProfileAge(profile) {
if (!profile) { if (!profile) {
profile = PathUtils.profileDir; profile = PathUtils.profileDir;
} }

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var PromiseUtils = {
var EXPORTED_SYMBOLS = ["PromiseUtils"];
var PromiseUtils = {
/* /*
* Creates a new pending Promise and provide methods to resolve and reject this Promise. * Creates a new pending Promise and provide methods to resolve and reject this Promise.
* *

View File

@@ -53,10 +53,6 @@
* read the set lazily and has no indices semantics. * read the set lazily and has no indices semantics.
*/ */
"use strict";
var EXPORTED_SYMBOLS = ["PropertyListUtils"];
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
@@ -65,7 +61,7 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/ctypes.jsm" "resource://gre/modules/ctypes.jsm"
); );
var PropertyListUtils = Object.freeze({ export var PropertyListUtils = Object.freeze({
/** /**
* Asynchronously reads a file as a property list. * Asynchronously reads a file as a property list.
* *

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["RemotePageAccessManager"];
/* /*
* RemotePageAccessManager determines which RPM functions a given * RemotePageAccessManager determines which RPM functions a given
* about page is allowed to access. It does this based on a map from about * about page is allowed to access. It does this based on a map from about
@@ -19,7 +15,7 @@ var EXPORTED_SYMBOLS = ["RemotePageAccessManager"];
* Please note that prefs that one wants to update need to be * Please note that prefs that one wants to update need to be
* explicitly allowed within AsyncPrefs.jsm. * explicitly allowed within AsyncPrefs.jsm.
*/ */
let RemotePageAccessManager = { export let RemotePageAccessManager = {
/* The accessMap lists the permissions that are allowed per page. /* The accessMap lists the permissions that are allowed per page.
* The structure should be of the following form: * The structure should be of the following form:
* <URL> : { * <URL> : {

View File

@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["ResetProfile"];
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -13,7 +9,7 @@ const { AppConstants } = ChromeUtils.import(
const MOZ_APP_NAME = AppConstants.MOZ_APP_NAME; const MOZ_APP_NAME = AppConstants.MOZ_APP_NAME;
const MOZ_BUILD_APP = AppConstants.MOZ_BUILD_APP; const MOZ_BUILD_APP = AppConstants.MOZ_BUILD_APP;
var ResetProfile = { export var ResetProfile = {
/** /**
* Check if reset is supported for the currently running profile. * Check if reset is supported for the currently running profile.
* *

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export function ResponsivenessMonitor(intervalMS = 100) {
var EXPORTED_SYMBOLS = ["ResponsivenessMonitor"];
function ResponsivenessMonitor(intervalMS = 100) {
this._intervalMS = intervalMS; this._intervalMS = intervalMS;
this._prevTimestamp = Date.now(); this._prevTimestamp = Date.now();
this._accumulatedDelay = 0; this._accumulatedDelay = 0;

View File

@@ -3,11 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var SelectionUtils = {
var EXPORTED_SYMBOLS = ["SelectionUtils"];
var SelectionUtils = {
/** /**
* Trim the selection text to a reasonable size and sanitize it to make it * Trim the selection text to a reasonable size and sanitize it to make it
* safe for search query input. * safe for search query input.

View File

@@ -2,16 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/** /**
* This module consolidates various code and data update requests, so flags * This module consolidates various code and data update requests, so flags
* can be set, Telemetry collected, etc. in a central place. * can be set, Telemetry collected, etc. in a central place.
*/ */
const { XPCOMUtils } = ChromeUtils.importESModule( import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {}; const lazy = {};
@@ -41,8 +37,6 @@ XPCOMUtils.defineLazyServiceGetter(
"nsINetworkLinkService" "nsINetworkLinkService"
); );
var EXPORTED_SYMBOLS = ["ServiceRequest"];
const PROXY_CONFIG_TYPES = [ const PROXY_CONFIG_TYPES = [
"direct", "direct",
"manual", "manual",
@@ -123,7 +117,7 @@ async function getProxySource(proxyInfo) {
* *
* @param {Object} options - Options for underlying XHR, e.g. { mozAnon: bool } * @param {Object} options - Options for underlying XHR, e.g. { mozAnon: bool }
*/ */
class ServiceRequest extends XMLHttpRequest { export class ServiceRequest extends XMLHttpRequest {
constructor(options) { constructor(options) {
super(options); super(options);
} }

View File

@@ -2,13 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["ShortcutUtils"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -27,7 +22,7 @@ XPCOMUtils.defineLazyGetter(lazy, "Keys", function() {
); );
}); });
var ShortcutUtils = { export var ShortcutUtils = {
IS_VALID: "valid", IS_VALID: "valid",
INVALID_KEY: "invalid_key", INVALID_KEY: "invalid_key",
INVALID_MODIFIER: "invalid_modifier", INVALID_MODIFIER: "invalid_modifier",

View File

@@ -2,13 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
var EXPORTED_SYMBOLS = ["Sqlite"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm"); const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
const lazy = {}; const lazy = {};
@@ -1766,7 +1761,7 @@ OpenedConnection.prototype = Object.freeze({
}, },
}); });
var Sqlite = { export var Sqlite = {
// The maximum time to wait before considering a transaction stuck and // The maximum time to wait before considering a transaction stuck and
// issuing a ROLLBACK, see `executeTransaction`. Could be modified by tests. // issuing a ROLLBACK, see `executeTransaction`. Could be modified by tests.
TRANSACTIONS_TIMEOUT_MS: 300000, // 5 minutes TRANSACTIONS_TIMEOUT_MS: 300000, // 5 minutes

View File

@@ -2,10 +2,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this file, - 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/. */ - You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["SubDialog", "SubDialogManager"];
/** /**
* The SubDialog resize callback. * The SubDialog resize callback.
* @callback SubDialog~resizeCallback * @callback SubDialog~resizeCallback
@@ -27,7 +23,7 @@ var EXPORTED_SYMBOLS = ["SubDialog", "SubDialogManager"];
* @param {SubDialog~resizeCallback} [resizeCallback] - Function to be called on * @param {SubDialog~resizeCallback} [resizeCallback] - Function to be called on
* dialog resize. * dialog resize.
*/ */
function SubDialog({ export function SubDialog({
template, template,
parentElement, parentElement,
id, id,
@@ -904,7 +900,7 @@ SubDialog.prototype = {
/** /**
* Manages multiple SubDialogs in a dialog stack element. * Manages multiple SubDialogs in a dialog stack element.
*/ */
class SubDialogManager { export class SubDialogManager {
/** /**
* @param {Object} options - Dialog manager options. * @param {Object} options - Dialog manager options.
* @param {DOMNode} options.dialogStack - Container element for all dialogs * @param {DOMNode} options.dialogStack - Container element for all dialogs

View File

@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["Troubleshoot"];
const { AddonManager } = ChromeUtils.import( const { AddonManager } = ChromeUtils.import(
"resource://gre/modules/AddonManager.jsm" "resource://gre/modules/AddonManager.jsm"
); );
@@ -166,7 +164,7 @@ function getPrefList(filter, allowlist = PREFS_FOR_DISPLAY) {
}, {}); }, {});
} }
var Troubleshoot = { export var Troubleshoot = {
/** /**
* Captures a snapshot of data that may help troubleshooters troubleshoot * Captures a snapshot of data that may help troubleshooters troubleshoot
* trouble. * trouble.

View File

@@ -1,13 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["UpdateUtils"]; import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
@@ -31,7 +27,7 @@ const FILE_UPDATE_LOCALE = "update.locale";
const PREF_APP_DISTRIBUTION = "distribution.id"; const PREF_APP_DISTRIBUTION = "distribution.id";
const PREF_APP_DISTRIBUTION_VERSION = "distribution.version"; const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
var UpdateUtils = { export var UpdateUtils = {
_locale: undefined, _locale: undefined,
_configFilePath: undefined, _configFilePath: undefined,

View File

@@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; export var WindowsRegistry = {
var EXPORTED_SYMBOLS = ["WindowsRegistry"];
var WindowsRegistry = {
/** /**
* Safely reads a value from the registry. * Safely reads a value from the registry.
* *

View File

@@ -45,13 +45,13 @@ with Files("tests/xpcshell/test_NewTabUtils.js"):
with Files("tests/xpcshell/test_UpdateUtils*.js"): with Files("tests/xpcshell/test_UpdateUtils*.js"):
BUG_COMPONENT = ("Toolkit", "Application Update") BUG_COMPONENT = ("Toolkit", "Application Update")
with Files("AsyncPrefs.jsm"): with Files("AsyncPrefs.sys.mjs"):
BUG_COMPONENT = ("Core", "Security: Process Sandboxing") BUG_COMPONENT = ("Core", "Security: Process Sandboxing")
with Files("AsanReporter.jsm"): with Files("AsanReporter.sys.mjs"):
BUG_COMPONENT = ("Firefox Build System", "General") BUG_COMPONENT = ("Firefox Build System", "General")
with Files("Color.jsm"): with Files("Color.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Find Toolbar") BUG_COMPONENT = ("Toolkit", "Find Toolbar")
with Files("Console.jsm"): with Files("Console.jsm"):
@@ -72,37 +72,37 @@ with Files("nsIE10SUtils.idl"):
with Files("Finder*.jsm"): with Files("Finder*.jsm"):
BUG_COMPONENT = ("Toolkit", "Find Toolbar") BUG_COMPONENT = ("Toolkit", "Find Toolbar")
with Files("FormLikeFactory.jsm"): with Files("FormLikeFactory.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Password Manager") BUG_COMPONENT = ("Toolkit", "Password Manager")
with Files("IndexedDB.jsm"): with Files("IndexedDB.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Async Tooling") BUG_COMPONENT = ("Toolkit", "Async Tooling")
with Files("InlineSpellChecker*.jsm"): with Files("InlineSpellChecker*.jsm"):
BUG_COMPONENT = ("Core", "Spelling checker") BUG_COMPONENT = ("Core", "Spelling checker")
with Files("Integration.jsm"): with Files("Integration.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Async Tooling") BUG_COMPONENT = ("Toolkit", "Async Tooling")
with Files("JSONFile.jsm"): with Files("JSONFile.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Form Manager") BUG_COMPONENT = ("Toolkit", "Form Manager")
with Files("LightweightThemeConsumer.jsm"): with Files("LightweightThemeConsumer.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Toolbars and Customization") BUG_COMPONENT = ("Firefox", "Toolbars and Customization")
with Files("NLP.jsm"): with Files("NLP.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Find Toolbar") BUG_COMPONENT = ("Toolkit", "Find Toolbar")
with Files("NewTabUtils.jsm"): with Files("NewTabUtils.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Tabbed Browser") BUG_COMPONENT = ("Firefox", "Tabbed Browser")
with Files("ObjectUtils.jsm"): with Files("ObjectUtils.jsm"):
BUG_COMPONENT = ("Toolkit", "Telemetry") BUG_COMPONENT = ("Toolkit", "Telemetry")
with Files("PermissionsUtils.jsm"): with Files("PermissionsUtils.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Add-ons Manager") BUG_COMPONENT = ("Toolkit", "Add-ons Manager")
with Files("PopupNotifications.jsm"): with Files("PopupNotifications.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Notifications and Alerts") BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
with Files("PrivateBrowsingUtils.jsm"): with Files("PrivateBrowsingUtils.jsm"):
@@ -111,22 +111,22 @@ with Files("PrivateBrowsingUtils.jsm"):
with Files("Promise*.jsm"): with Files("Promise*.jsm"):
BUG_COMPONENT = ("Toolkit", "Async Tooling") BUG_COMPONENT = ("Toolkit", "Async Tooling")
with Files("ResponsivenessMonitor.jsm"): with Files("ResponsivenessMonitor.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Migration") BUG_COMPONENT = ("Firefox", "Migration")
with Files("ShortcutUtils.jsm"): with Files("ShortcutUtils.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Toolbars and Customization") BUG_COMPONENT = ("Firefox", "Toolbars and Customization")
with Files("Sqlite.jsm"): with Files("Sqlite.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Storage") BUG_COMPONENT = ("Toolkit", "Storage")
with Files("SubDialog.jsm"): with Files("SubDialog.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Notifications and Alerts") BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
with Files("UpdateUtils.jsm"): with Files("UpdateUtils.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "Application Update") BUG_COMPONENT = ("Toolkit", "Application Update")
with Files("WindowsRegistry.jsm"): with Files("WindowsRegistry.sys.mjs"):
BUG_COMPONENT = ("Toolkit", "General") BUG_COMPONENT = ("Toolkit", "General")
@@ -148,81 +148,81 @@ with Files("docs/**"):
SCHEDULES.exclusive = ["docs"] SCHEDULES.exclusive = ["docs"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
"AboutPagesUtils.jsm", "AboutPagesUtils.sys.mjs",
"ActorManagerParent.jsm", "ActorManagerParent.jsm",
"AppMenuNotifications.jsm", "AppMenuNotifications.sys.mjs",
"AsyncPrefs.jsm", "AsyncPrefs.sys.mjs",
"BinarySearch.jsm", "BinarySearch.sys.mjs",
"BrowserTelemetryUtils.jsm", "BrowserTelemetryUtils.sys.mjs",
"BrowserUtils.jsm", "BrowserUtils.sys.mjs",
"CanonicalJSON.jsm", "CanonicalJSON.jsm",
"CertUtils.jsm", "CertUtils.sys.mjs",
"Color.jsm", "Color.sys.mjs",
"Console.jsm", "Console.jsm",
"ContentDOMReference.jsm", "ContentDOMReference.jsm",
"CreditCard.jsm", "CreditCard.sys.mjs",
"DateTimePickerPanel.jsm", "DateTimePickerPanel.sys.mjs",
"DeferredTask.jsm", "DeferredTask.jsm",
"Deprecated.jsm", "Deprecated.jsm",
"E10SUtils.jsm", "E10SUtils.jsm",
"EventEmitter.jsm", "EventEmitter.jsm",
"FileUtils.jsm", "FileUtils.sys.mjs",
"FindBarContent.jsm", "FindBarContent.sys.mjs",
"Finder.jsm", "Finder.sys.mjs",
"FinderHighlighter.jsm", "FinderHighlighter.sys.mjs",
"FinderIterator.jsm", "FinderIterator.sys.mjs",
"FinderParent.jsm", "FinderParent.sys.mjs",
"FirstStartup.jsm", "FirstStartup.sys.mjs",
"FormLikeFactory.jsm", "FormLikeFactory.sys.mjs",
"Geometry.jsm", "Geometry.sys.mjs",
"HiddenFrame.jsm", "HiddenFrame.sys.mjs",
"Http.jsm", "Http.sys.mjs",
"IgnoreLists.sys.mjs", "IgnoreLists.sys.mjs",
"IndexedDB.jsm", "IndexedDB.sys.mjs",
"InlineSpellChecker.jsm", "InlineSpellChecker.sys.mjs",
"InlineSpellCheckerContent.jsm", "InlineSpellCheckerContent.sys.mjs",
"Integration.jsm", "Integration.sys.mjs",
"JSONFile.jsm", "JSONFile.sys.mjs",
"JsonSchema.jsm", "JsonSchema.sys.mjs",
"KeywordUtils.jsm", "KeywordUtils.sys.mjs",
"LayoutUtils.jsm", "LayoutUtils.sys.mjs",
"Log.jsm", "Log.sys.mjs",
"NewTabUtils.jsm", "NewTabUtils.sys.mjs",
"NLP.jsm", "NLP.sys.mjs",
"ObjectUtils.jsm", "ObjectUtils.jsm",
"OsEnvironment.jsm", "OsEnvironment.sys.mjs",
"OSKeyStore.jsm", "OSKeyStore.sys.mjs",
"PermissionsUtils.jsm", "PermissionsUtils.sys.mjs",
"PopupNotifications.jsm", "PopupNotifications.sys.mjs",
"Preferences.jsm", "Preferences.jsm",
"PrivateBrowsingUtils.jsm", "PrivateBrowsingUtils.jsm",
"ProcessType.jsm", "ProcessType.sys.mjs",
"ProfileAge.jsm", "ProfileAge.sys.mjs",
"PromiseUtils.jsm", "PromiseUtils.sys.mjs",
"Region.sys.mjs", "Region.sys.mjs",
"RemotePageAccessManager.jsm", "RemotePageAccessManager.sys.mjs",
"ResetProfile.jsm", "ResetProfile.sys.mjs",
"ResponsivenessMonitor.jsm", "ResponsivenessMonitor.sys.mjs",
"SelectionUtils.jsm", "SelectionUtils.sys.mjs",
"ServiceRequest.jsm", "ServiceRequest.sys.mjs",
"Services.jsm", "Services.jsm",
"ShortcutUtils.jsm", "ShortcutUtils.sys.mjs",
"Sqlite.jsm", "Sqlite.sys.mjs",
"SubDialog.jsm", "SubDialog.sys.mjs",
"Timer.jsm", "Timer.jsm",
"Troubleshoot.jsm", "Troubleshoot.sys.mjs",
"UpdateUtils.jsm", "UpdateUtils.sys.mjs",
"WebChannel.jsm", "WebChannel.jsm",
] ]
if CONFIG["MOZ_ASAN_REPORTER"]: if CONFIG["MOZ_ASAN_REPORTER"]:
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
"AsanReporter.jsm", "AsanReporter.sys.mjs",
] ]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
"PropertyListUtils.jsm", "PropertyListUtils.sys.mjs",
] ]
EXTRA_JS_MODULES.third_party.jsesc += ["third_party/jsesc/jsesc.js"] EXTRA_JS_MODULES.third_party.jsesc += ["third_party/jsesc/jsesc.js"]
@@ -248,9 +248,9 @@ EXTRA_PP_JS_MODULES += [
if "Android" != CONFIG["OS_TARGET"]: if "Android" != CONFIG["OS_TARGET"]:
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
"GMPExtractorWorker.js", "GMPExtractorWorker.js",
"GMPInstallManager.jsm", "GMPInstallManager.sys.mjs",
"GMPUtils.jsm", "GMPUtils.sys.mjs",
"LightweightThemeConsumer.jsm", "LightweightThemeConsumer.sys.mjs",
] ]
DIRS += [ DIRS += [
@@ -259,7 +259,7 @@ if "Android" != CONFIG["OS_TARGET"]:
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
"WindowsRegistry.jsm", "WindowsRegistry.sys.mjs",
] ]
for var in ( for var in (

View File

@@ -383,13 +383,13 @@ avoid-blacklist-and-whitelist:
- toolkit/crashreporter/client/ping.cpp - toolkit/crashreporter/client/ping.cpp
- toolkit/crashreporter/CrashAnnotations.cpp - toolkit/crashreporter/CrashAnnotations.cpp
- toolkit/crashreporter/generate_crash_reporter_sources.py - toolkit/crashreporter/generate_crash_reporter_sources.py
- toolkit/modules/PermissionsUtils.jsm - toolkit/modules/PermissionsUtils.sys.mjs
- toolkit/modules/tests/browser/browser_AsyncPrefs.js - toolkit/modules/tests/browser/browser_AsyncPrefs.js
- toolkit/modules/tests/browser/browser_Troubleshoot.js - toolkit/modules/tests/browser/browser_Troubleshoot.js
- toolkit/modules/tests/browser/browser_web_channel.js - toolkit/modules/tests/browser/browser_web_channel.js
- toolkit/modules/tests/xpcshell/test_PermissionsUtils.js - toolkit/modules/tests/xpcshell/test_PermissionsUtils.js
- toolkit/modules/third_party/jsesc/jsesc.js - toolkit/modules/third_party/jsesc/jsesc.js
- toolkit/modules/Troubleshoot.jsm - toolkit/modules/Troubleshoot.sys.mjs
- toolkit/mozapps/extensions/internal/XPIInstall.jsm - toolkit/mozapps/extensions/internal/XPIInstall.jsm
- toolkit/mozapps/extensions/internal/XPIProvider.jsm - toolkit/mozapps/extensions/internal/XPIProvider.jsm
- toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js - toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js