Update On Fri Sep 30 20:55:04 CEST 2022

This commit is contained in:
github-action[bot] 2022-09-30 20:55:05 +02:00
parent 82ff8ef763
commit 92d8879e59
972 changed files with 10987 additions and 14340 deletions

6
Cargo.lock generated
View file

@ -318,7 +318,7 @@ dependencies = [
[[package]] [[package]]
name = "audioipc2" name = "audioipc2"
version = "0.5.0" version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb" source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"ashmem", "ashmem",
@ -346,7 +346,7 @@ dependencies = [
[[package]] [[package]]
name = "audioipc2-client" name = "audioipc2-client"
version = "0.5.0" version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb" source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [ dependencies = [
"audio_thread_priority", "audio_thread_priority",
"audioipc2", "audioipc2",
@ -357,7 +357,7 @@ dependencies = [
[[package]] [[package]]
name = "audioipc2-server" name = "audioipc2-server"
version = "0.5.0" version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb" source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [ dependencies = [
"audio_thread_priority", "audio_thread_priority",
"audioipc2", "audioipc2",

View file

@ -9,8 +9,8 @@ var EXPORTED_SYMBOLS = ["AboutPrivateBrowsingParent"];
const { ASRouter } = ChromeUtils.import( const { ASRouter } = ChromeUtils.import(
"resource://activity-stream/lib/ASRouter.jsm" "resource://activity-stream/lib/ASRouter.jsm"
); );
const { BrowserUtils } = ChromeUtils.import( const { BrowserUtils } = ChromeUtils.importESModule(
"resource://gre/modules/BrowserUtils.jsm" "resource://gre/modules/BrowserUtils.sys.mjs"
); );
const { XPCOMUtils } = ChromeUtils.importESModule( const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs" "resource://gre/modules/XPCOMUtils.sys.mjs"

View file

@ -12,11 +12,11 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs", Region: "resource://gre/modules/Region.sys.mjs",
}); });
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
FXA_PWDMGR_HOST: "resource://gre/modules/FxAccountsCommon.js", FXA_PWDMGR_HOST: "resource://gre/modules/FxAccountsCommon.js",
FXA_PWDMGR_REALM: "resource://gre/modules/FxAccountsCommon.js", FXA_PWDMGR_REALM: "resource://gre/modules/FxAccountsCommon.js",
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",

View file

@ -27,11 +27,9 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/E10SUtils.jsm" "resource://gre/modules/E10SUtils.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
"BrowserUtils", });
"resource://gre/modules/BrowserUtils.jsm"
);
class MiddleMousePasteHandlerChild extends JSWindowActorChild { class MiddleMousePasteHandlerChild extends JSWindowActorChild {
handleEvent(clickEvent) { handleEvent(clickEvent) {

View file

@ -14,15 +14,18 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
InlineSpellCheckerContent:
"resource://gre/modules/InlineSpellCheckerContent.sys.mjs",
SelectionUtils: "resource://gre/modules/SelectionUtils.sys.mjs",
SpellCheckHelper: "resource://gre/modules/InlineSpellChecker.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
E10SUtils: "resource://gre/modules/E10SUtils.jsm", E10SUtils: "resource://gre/modules/E10SUtils.jsm",
SpellCheckHelper: "resource://gre/modules/InlineSpellChecker.jsm",
LoginManagerChild: "resource://gre/modules/LoginManagerChild.jsm", LoginManagerChild: "resource://gre/modules/LoginManagerChild.jsm",
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm", WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
SelectionUtils: "resource://gre/modules/SelectionUtils.jsm",
InlineSpellCheckerContent:
"resource://gre/modules/InlineSpellCheckerContent.jsm",
ContentDOMReference: "resource://gre/modules/ContentDOMReference.jsm", ContentDOMReference: "resource://gre/modules/ContentDOMReference.jsm",
}); });

View file

@ -7,9 +7,7 @@
* the display of the help panel on invalid elements. * the display of the help panel on invalid elements.
*/ */
const { LayoutUtils } = ChromeUtils.import( import { LayoutUtils } from "resource://gre/modules/LayoutUtils.sys.mjs";
"resource://gre/modules/LayoutUtils.jsm"
);
export class FormValidationChild extends JSWindowActorChild { export class FormValidationChild extends JSWindowActorChild {
constructor() { constructor() {

View file

@ -22,11 +22,9 @@ const PREF_SSL_IMPACT_ROOTS = [
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
"BrowserUtils", });
"resource://gre/modules/BrowserUtils.jsm"
);
class CaptivePortalObserver { class CaptivePortalObserver {
constructor(actor) { constructor(actor) {

View file

@ -0,0 +1,8 @@
WIN32_MODULE_COMPANYNAME=Mozilla Corporation
WIN32_MODULE_COPYRIGHT=©Firefox and Mozilla Developers; available under the MPL 2 license.
WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@
WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@
WIN32_MODULE_TRADEMARKS=Firefox is a Trademark of The Mozilla Foundation.
WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@
WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@
WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@

View file

@ -2722,3 +2722,10 @@ pref("browser.places.snapshots.expiration.userManaged.days", 420);
pref("browser.firefox-view.feature-tour", "{\"message\":\"FIREFOX_VIEW_FEATURE_TOUR\",\"screen\":\"FIREFOX_VIEW_SPOTLIGHT\",\"complete\":false}"); pref("browser.firefox-view.feature-tour", "{\"message\":\"FIREFOX_VIEW_FEATURE_TOUR\",\"screen\":\"FIREFOX_VIEW_SPOTLIGHT\",\"complete\":false}");
// Number of times the user visited about:firefoxview // Number of times the user visited about:firefoxview
pref("browser.firefox-view.view-count", 0); pref("browser.firefox-view.view-count", 0);
// Enables cookie banner handling in Nightly in Private Browsing Mode. See
// StaticPrefList.yaml for a description of the prefs.
#ifdef NIGHTLY_BUILD
pref("cookiebanners.service.mode.privateBrowsing", 1);
pref("cookiebanners.bannerClicking.enabled", true);
#endif

View file

@ -10,10 +10,14 @@
var { XPCOMUtils } = ChromeUtils.importESModule( var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs" "resource://gre/modules/XPCOMUtils.sys.mjs"
); );
ChromeUtils.defineESModuleGetters(this, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyModuleGetters(this, {
AppUpdater: "resource:///modules/AppUpdater.jsm", AppUpdater: "resource:///modules/AppUpdater.jsm",
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm", DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
}); });
var UPDATING_MIN_DISPLAY_TIME_MS = 1500; var UPDATING_MIN_DISPLAY_TIME_MS = 1500;
@ -80,7 +84,7 @@ appUpdater.prototype = {
}, },
get selectedPanel() { get selectedPanel() {
return this.updateDeck.querySelector(".selected"); return this.updateDeck.selectedPanel;
}, },
_onAppUpdateStatus(status, ...args) { _onAppUpdateStatus(status, ...args) {
@ -94,22 +98,23 @@ appUpdater.prototype = {
case AppUpdater.STATUS.OTHER_INSTANCE_HANDLING_UPDATES: case AppUpdater.STATUS.OTHER_INSTANCE_HANDLING_UPDATES:
this.selectPanel("otherInstanceHandlingUpdates"); this.selectPanel("otherInstanceHandlingUpdates");
break; break;
case AppUpdater.STATUS.DOWNLOADING: case AppUpdater.STATUS.DOWNLOADING: {
this.downloadStatus = document.getElementById("downloadStatus"); let downloadStatus = document.getElementById("downloadStatus");
if (!args.length) { if (!args.length) {
this.downloadStatus.textContent = DownloadUtils.getTransferTotal( downloadStatus.textContent = DownloadUtils.getTransferTotal(
0, 0,
this.update.selectedPatch.size this.update.selectedPatch.size
); );
this.selectPanel("downloading"); this.selectPanel("downloading");
} else { } else {
let [progress, max] = args; let [progress, max] = args;
this.downloadStatus.textContent = DownloadUtils.getTransferTotal( downloadStatus.textContent = DownloadUtils.getTransferTotal(
progress, progress,
max max
); );
} }
break; break;
}
case AppUpdater.STATUS.STAGING: case AppUpdater.STATUS.STAGING:
this.selectPanel("applying"); this.selectPanel("applying");
break; break;
@ -172,6 +177,9 @@ appUpdater.prototype = {
icons.className = aChildID; icons.className = aChildID;
} }
// Make sure to select the panel before potentially auto-focusing the button.
this.updateDeck.selectedPanel = panel;
let button = panel.querySelector("button"); let button = panel.querySelector("button");
if (button) { if (button) {
if (aChildID == "downloadAndInstall") { if (aChildID == "downloadAndInstall") {
@ -192,8 +200,6 @@ appUpdater.prototype = {
"update.downloadAndInstallButton.accesskey" "update.downloadAndInstallButton.accesskey"
); );
} }
this.selectedPanel?.classList.remove("selected");
panel.classList.add("selected");
if ( if (
this.options.buttonAutoFocus && this.options.buttonAutoFocus &&
(!document.commandDispatcher.focusedElement || // don't steal the focus (!document.commandDispatcher.focusedElement || // don't steal the focus
@ -202,9 +208,6 @@ appUpdater.prototype = {
// except from the other buttons // except from the other buttons
button.focus(); button.focus();
} }
} else {
this.selectedPanel?.classList.remove("selected");
panel.classList.add("selected");
} }
}, },

View file

@ -3,14 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@namespace html "http://www.w3.org/1999/xhtml"; @namespace html "http://www.w3.org/1999/xhtml";
:root { -moz-box-layout: flex }
#aboutDialog { #aboutDialog {
width: 620px;
/* Set an explicit line-height to avoid discrepancies in 'auto' spacing /* Set an explicit line-height to avoid discrepancies in 'auto' spacing
across screens with different device DPI, which may cause font metrics across screens with different device DPI, which may cause font metrics
to round differently. */ to round differently. */
line-height: 1.5; line-height: 1.5;
} }
#aboutDialogContainer {
-moz-box-flex: 1;
}
#rightBox { #rightBox {
background-image: url("chrome://branding/content/about-wordmark.svg"); background-image: url("chrome://branding/content/about-wordmark.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
@ -60,16 +65,19 @@
padding-inline-start: 0; padding-inline-start: 0;
} }
#updateDeck > *:not(.selected) { #updateDeck {
visibility: hidden; align-items: center;
} }
#updateButton, #updateButton {
#updateDeck > hbox > label {
margin-inline-start: 0; margin-inline-start: 0;
padding-inline-start: 0; padding-inline-start: 0;
} }
#updateDeck description {
margin: 0;
}
.update-throbber { .update-throbber {
width: 16px; width: 16px;
min-height: 16px; min-height: 16px;
@ -116,7 +124,7 @@ description > .text-link {
#icons > .icon { #icons > .icon {
-moz-context-properties: fill; -moz-context-properties: fill;
margin: 5px; margin: 10px 5px;
width: 16px; width: 16px;
height: 16px; height: 16px;
} }

View file

@ -109,7 +109,8 @@ async function init(aEvent) {
document.getElementById("release").hidden = false; document.getElementById("release").hidden = false;
} }
window.sizeToContent(); const prefWidth = parseFloat(document.documentElement.getAttribute("width"));
window.sizeToContentConstrained(prefWidth, 0);
if (AppConstants.platform == "macosx") { if (AppConstants.platform == "macosx") {
window.moveTo( window.moveTo(

View file

@ -12,6 +12,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="aboutDialog" id="aboutDialog"
windowtype="Browser:About" windowtype="Browser:About"
width="620"
onload="init(event);" onload="init(event);"
#ifdef MOZ_UPDATER #ifdef MOZ_UPDATER
onunload="onUnload(event);" onunload="onUnload(event);"
@ -37,7 +38,7 @@
<script src="chrome://browser/content/aboutDialog.js"/> <script src="chrome://browser/content/aboutDialog.js"/>
<vbox id="aboutDialogContainer"> <html:div id="aboutDialogContainer">
<hbox id="clientBox"> <hbox id="clientBox">
<vbox id="leftBox" flex="1"/> <vbox id="leftBox" flex="1"/>
<vbox id="rightBox" flex="1"> <vbox id="rightBox" flex="1">
@ -65,59 +66,44 @@
<html:img class="icon apply" src="chrome://global/skin/icons/reload.svg" role="presentation"/> <html:img class="icon apply" src="chrome://global/skin/icons/reload.svg" role="presentation"/>
</html:div> </html:div>
<vbox> <vbox>
<stack id="updateDeck" orient="vertical"> <deck id="updateDeck" orient="vertical">
<hbox id="checkForUpdates" align="center"> <description id="checkForUpdates">
<button id="checkForUpdatesButton" align="start" <button id="checkForUpdatesButton"
data-l10n-id="update-checkForUpdatesButton" data-l10n-id="update-checkForUpdatesButton"
oncommand="gAppUpdater.checkForUpdates();"/> oncommand="gAppUpdater.checkForUpdates();"/>
<spacer flex="1"/> </description>
</hbox> <description id="downloadAndInstall">
<hbox id="downloadAndInstall" align="center"> <button id="downloadAndInstallButton"
<button id="downloadAndInstallButton" align="start"
oncommand="gAppUpdater.startDownload();"/> oncommand="gAppUpdater.startDownload();"/>
<!-- label and accesskey will be filled by JS --> <!-- label and accesskey will be filled by JS -->
<spacer flex="1"/> </description>
</hbox> <description id="apply">
<hbox id="apply" align="center"> <button id="updateButton"
<button id="updateButton" align="start"
data-l10n-id="update-updateButton" data-l10n-id="update-updateButton"
oncommand="gAppUpdater.buttonRestartAfterDownload();"/> oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
<spacer flex="1"/> </description>
</hbox> <description id="checkingForUpdates" data-l10n-id="update-checkingForUpdates"/>
<hbox id="checkingForUpdates" align="center"> <description id="downloading" data-l10n-id="update-downloading-message">
<label data-l10n-id="update-checkingForUpdates"/>
</hbox>
<hbox id="downloading" data-l10n-id="update-downloading-message" align="center">
<label id="downloadStatus" data-l10n-name="download-status"/> <label id="downloadStatus" data-l10n-name="download-status"/>
</hbox> </description>
<hbox id="applying" align="center"> <description id="applying" data-l10n-id="update-applying"/>
<label data-l10n-id="update-applying"/> <description id="downloadFailed" data-l10n-id="update-failed">
</hbox>
<hbox id="downloadFailed" align="center" data-l10n-id="update-failed">
<label id="failedLink" is="text-link" data-l10n-name="failed-link"/> <label id="failedLink" is="text-link" data-l10n-name="failed-link"/>
</hbox> </description>
<hbox id="policyDisabled" align="center"> <description id="policyDisabled" data-l10n-id="update-adminDisabled"/>
<label data-l10n-id="update-adminDisabled"/> <description id="noUpdatesFound" data-l10n-id="update-noUpdatesFound"/>
</hbox> <description id="otherInstanceHandlingUpdates" data-l10n-id="update-otherInstanceHandlingUpdates"/>
<hbox id="noUpdatesFound" align="center"> <description id="manualUpdate" data-l10n-id="update-manual">
<label data-l10n-id="update-noUpdatesFound"/>
</hbox>
<hbox id="otherInstanceHandlingUpdates" align="center">
<label data-l10n-id="update-otherInstanceHandlingUpdates"/>
</hbox>
<hbox id="manualUpdate" align="center" data-l10n-id="update-manual">
<label class="manualLink" is="text-link" data-l10n-name="manual-link"/> <label class="manualLink" is="text-link" data-l10n-name="manual-link"/>
</hbox> </description>
<hbox id="unsupportedSystem" align="center" data-l10n-id="update-unsupported"> <description id="unsupportedSystem" data-l10n-id="update-unsupported">
<label id="unsupportedLink" is="text-link" data-l10n-name="unsupported-link"/> <label id="unsupportedLink" is="text-link" data-l10n-name="unsupported-link"/>
</hbox> </description>
<hbox id="restarting" align="center"> <description id="restarting" data-l10n-id="update-restarting"/>
<label data-l10n-id="update-restarting"/> <description id="internalError" data-l10n-id="update-internal-error">
</hbox>
<hbox id="internalError" align="center" data-l10n-id="update-internal-error">
<label class="manualLink" is="text-link" data-l10n-name="manual-link"/> <label class="manualLink" is="text-link" data-l10n-name="manual-link"/>
</hbox> </description>
</stack> </deck>
<!-- This HBOX is duplicated above without class="update" --> <!-- This HBOX is duplicated above without class="update" -->
<hbox align="baseline"> <hbox align="baseline">
<label id="version" class="update"/> <label id="version" class="update"/>
@ -162,7 +148,7 @@
</hbox> </hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description> <description id="trademark" data-l10n-id="trademarkInfo"></description>
</vbox> </vbox>
</vbox> </html:div>
<keyset> <keyset>
<key keycode="VK_ESCAPE" oncommand="window.close();"/> <key keycode="VK_ESCAPE" oncommand="window.close();"/>

View file

@ -365,6 +365,9 @@ var ctrlTab = {
return; return;
} }
// If the tab is already in the list, remove it before re-inserting it.
this.detachTab(aTab);
if (aPos == 0) { if (aPos == 0) {
this._recentlyUsedTabs.unshift(aTab); this._recentlyUsedTabs.unshift(aTab);
} else if (aPos) { } else if (aPos) {
@ -566,7 +569,6 @@ var ctrlTab = {
} }
break; break;
case "TabSelect": case "TabSelect":
this.detachTab(event.target);
this.attachTab(event.target, 0); this.attachTab(event.target, 0);
// If the previous tab was hidden (e.g. Firefox View), remove it from // If the previous tab was hidden (e.g. Firefox View), remove it from
// the list when it's deselected. // the list when it's deselected.

View file

@ -14,7 +14,9 @@ var gDataNotificationInfoBar = {
_DATA_REPORTING_NOTIFICATION: "data-reporting", _DATA_REPORTING_NOTIFICATION: "data-reporting",
get _log() { get _log() {
let { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm"); let { Log } = ChromeUtils.importESModule(
"resource://gre/modules/Log.sys.mjs"
);
delete this._log; delete this._log;
return (this._log = Log.repository.getLoggerWithMessagePrefix( return (this._log = Log.repository.getLoggerWithMessagePrefix(
"Toolkit.Telemetry", "Toolkit.Telemetry",

View file

@ -17,21 +17,16 @@ XPCOMUtils.defineLazyPreferenceGetter(
false false
); );
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
var docWeak = Cu.getWeakReference(document);
XPCOMUtils.defineLazyPreferenceGetter( XPCOMUtils.defineLazyPreferenceGetter(
this, this,
"SHOW_OTHER_BOOKMARKS", "SHOW_OTHER_BOOKMARKS",
"browser.toolbars.bookmarks.showOtherBookmarks", "browser.toolbars.bookmarks.showOtherBookmarks",
true, true,
(aPref, aPrevVal, aNewVal) => { (aPref, aPrevVal, aNewVal) => {
let doc = docWeak.get();
if (!doc) {
return;
}
BookmarkingUI.maybeShowOtherBookmarksFolder(); BookmarkingUI.maybeShowOtherBookmarksFolder();
doc.getElementById("PlacesToolbar")?._placesView?.updateNodesVisibility(); document
.getElementById("PlacesToolbar")
?._placesView?.updateNodesVisibility();
} }
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(

View file

@ -662,10 +662,6 @@ var SidebarUI = {
}, },
}; };
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
var docWeak = Cu.getWeakReference(document);
// Add getters related to the position here, since we will want them // Add getters related to the position here, since we will want them
// available for both startDelayedLoad and init. // available for both startDelayedLoad and init.
XPCOMUtils.defineLazyPreferenceGetter( XPCOMUtils.defineLazyPreferenceGetter(
@ -673,11 +669,5 @@ XPCOMUtils.defineLazyPreferenceGetter(
"_positionStart", "_positionStart",
SidebarUI.POSITION_START_PREF, SidebarUI.POSITION_START_PREF,
true, true,
() => { SidebarUI.setPosition.bind(SidebarUI)
let doc = docWeak.get();
if (!doc) {
return;
}
SidebarUI.setPosition();
}
); );

View file

@ -347,7 +347,9 @@ var gSync = {
get log() { get log() {
if (!this._log) { if (!this._log) {
const { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm"); const { Log } = ChromeUtils.importESModule(
"resource://gre/modules/Log.sys.mjs"
);
let syncLog = Log.repository.getLogger("Sync.Browser"); let syncLog = Log.repository.getLogger("Sync.Browser");
syncLog.manageLevelFromPref("services.sync.log.logger.browser"); syncLog.manageLevelFromPref("services.sync.log.logger.browser");
this._log = syncLog; this._log = syncLog;

View file

@ -16,13 +16,24 @@ ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs", AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs", BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.sys.mjs",
Color: "resource://gre/modules/Color.sys.mjs",
FirefoxViewNotificationManager: FirefoxViewNotificationManager:
"resource:///modules/firefox-view-notification-manager.sys.mjs", "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", PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs", PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs", ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
SubDialog: "resource://gre/modules/SubDialog.sys.mjs",
SubDialogManager: "resource://gre/modules/SubDialog.sys.mjs",
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
UrlbarInput: "resource:///modules/UrlbarInput.sys.mjs", UrlbarInput: "resource:///modules/UrlbarInput.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs", UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
UrlbarProviderSearchTips: UrlbarProviderSearchTips:
@ -39,11 +50,9 @@ XPCOMUtils.defineLazyModuleGetters(this, {
AMTelemetry: "resource://gre/modules/AddonManager.jsm", AMTelemetry: "resource://gre/modules/AddonManager.jsm",
NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.jsm", NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.jsm",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm", BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.jsm",
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm", BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm", BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
CFRPageActions: "resource://activity-stream/lib/CFRPageActions.jsm", CFRPageActions: "resource://activity-stream/lib/CFRPageActions.jsm",
Color: "resource://gre/modules/Color.jsm",
ContextualIdentityService: ContextualIdentityService:
"resource://gre/modules/ContextualIdentityService.jsm", "resource://gre/modules/ContextualIdentityService.jsm",
CustomizableUI: "resource:///modules/CustomizableUI.jsm", CustomizableUI: "resource:///modules/CustomizableUI.jsm",
@ -56,14 +65,10 @@ XPCOMUtils.defineLazyModuleGetters(this, {
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm", NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm", ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
HomePage: "resource:///modules/HomePage.jsm", HomePage: "resource:///modules/HomePage.jsm",
LightweightThemeConsumer:
"resource://gre/modules/LightweightThemeConsumer.jsm",
Log: "resource://gre/modules/Log.jsm",
LoginHelper: "resource://gre/modules/LoginHelper.jsm", LoginHelper: "resource://gre/modules/LoginHelper.jsm",
LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm", LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm", MigrationUtils: "resource:///modules/MigrationUtils.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm", OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
PageActions: "resource:///modules/PageActions.jsm", PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm", PageThumbs: "resource://gre/modules/PageThumbs.jsm",
@ -73,7 +78,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Pocket: "chrome://pocket/content/Pocket.jsm", Pocket: "chrome://pocket/content/Pocket.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm", ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
PromptUtils: "resource://gre/modules/SharedPromptUtils.jsm", PromptUtils: "resource://gre/modules/SharedPromptUtils.jsm",
// TODO (Bug 1529552): Remove once old urlbar code goes away. // TODO (Bug 1529552): Remove once old urlbar code goes away.
ReaderMode: "resource://gre/modules/ReaderMode.jsm", ReaderMode: "resource://gre/modules/ReaderMode.jsm",
@ -83,17 +87,13 @@ XPCOMUtils.defineLazyModuleGetters(this, {
SaveToPocket: "chrome://pocket/content/SaveToPocket.jsm", SaveToPocket: "chrome://pocket/content/SaveToPocket.jsm",
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm", SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm", SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
SiteDataManager: "resource:///modules/SiteDataManager.jsm", SiteDataManager: "resource:///modules/SiteDataManager.jsm",
SitePermissions: "resource:///modules/SitePermissions.jsm", SitePermissions: "resource:///modules/SitePermissions.jsm",
SubDialog: "resource://gre/modules/SubDialog.jsm",
SubDialogManager: "resource://gre/modules/SubDialog.jsm",
TabModalPrompt: "chrome://global/content/tabprompts.jsm", TabModalPrompt: "chrome://global/content/tabprompts.jsm",
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm", TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm", TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm",
Translation: "resource:///modules/translation/TranslationParent.jsm", Translation: "resource:///modules/translation/TranslationParent.jsm",
UITour: "resource:///modules/UITour.jsm", UITour: "resource:///modules/UITour.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
Weave: "resource://services-sync/main.js", Weave: "resource://services-sync/main.js",
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm", WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
webrtcUI: "resource:///modules/webrtcUI.jsm", webrtcUI: "resource:///modules/webrtcUI.jsm",
@ -421,16 +421,16 @@ XPCOMUtils.defineLazyGetter(this, "gNotificationBox", () => {
}); });
XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", () => { XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", () => {
let { InlineSpellChecker } = ChromeUtils.import( let { InlineSpellChecker } = ChromeUtils.importESModule(
"resource://gre/modules/InlineSpellChecker.jsm" "resource://gre/modules/InlineSpellChecker.sys.mjs"
); );
return new InlineSpellChecker(); return new InlineSpellChecker();
}); });
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", () => { XPCOMUtils.defineLazyGetter(this, "PopupNotifications", () => {
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
let { PopupNotifications } = ChromeUtils.import( let { PopupNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/PopupNotifications.jsm" "resource://gre/modules/PopupNotifications.sys.mjs"
); );
try { try {
// Hide all PopupNotifications while the URL is being edited and the // Hide all PopupNotifications while the URL is being edited and the

View file

@ -257,8 +257,8 @@ class nsContextMenu {
this.selectionInfo = this.contentData.selectionInfo; this.selectionInfo = this.contentData.selectionInfo;
this.actor = this.contentData.actor; this.actor = this.contentData.actor;
} else { } else {
const { SelectionUtils } = ChromeUtils.import( const { SelectionUtils } = ChromeUtils.importESModule(
"resource://gre/modules/SelectionUtils.jsm" "resource://gre/modules/SelectionUtils.sys.mjs"
); );
this.browser = this.ownerDoc.defaultView.docShell.chromeEventHandler; this.browser = this.ownerDoc.defaultView.docShell.chromeEventHandler;

View file

@ -2,6 +2,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/. */
#mainDeck {
padding: 10px;
min-height: 0;
}
#viewGroup > radio > .radio-label-box { #viewGroup > radio > .radio-label-box {
-moz-box-orient: vertical; -moz-box-orient: vertical;
-moz-box-align: center; -moz-box-align: center;

View file

@ -5,8 +5,8 @@
const appStartup = Services.startup; const appStartup = Services.startup;
const { ResetProfile } = ChromeUtils.import( const { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.jsm" "resource://gre/modules/ResetProfile.sys.mjs"
); );
var defaultToReset = false; var defaultToReset = false;

View file

@ -20,13 +20,9 @@ const THIRD_PARTY_FAVICON_URI =
TEST_THIRD_PARTY_SITE + TEST_THIRD_PARTY_SITE +
"/browser/browser/base/content/test/favicons/file_favicon.png"; "/browser/browser/base/content/test/favicons/file_favicon.png";
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs", PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
}); });
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal(); let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();

View file

@ -82,8 +82,9 @@ add_task(async function() {
let updateChannel = null; let updateChannel = null;
try { try {
updateChannel = ChromeUtils.import("resource://gre/modules/UpdateUtils.jsm") updateChannel = ChromeUtils.importESModule(
.UpdateUtils.UpdateChannel; "resource://gre/modules/UpdateUtils.sys.mjs"
).UpdateUtils.UpdateChannel;
} catch (ex) {} } catch (ex) {}
if (!updateChannel) { if (!updateChannel) {
Assert.ok( Assert.ok(

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",
@ -78,6 +78,9 @@ const intermittently_loaded_scripts = {
// may not load early enough for the test. // may not load early enough for the test.
"resource://webcompat/AboutCompat.jsm", "resource://webcompat/AboutCompat.jsm",
// Cookie banner handling.
"resource://gre/actors/CookieBannerChild.jsm",
// Test related // Test related
"chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm", "chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm",
"chrome://remote/content/shared/Log.jsm", "chrome://remote/content/shared/Log.jsm",

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",
@ -67,6 +67,9 @@ const intermittently_loaded_scripts = {
modules: new Set([ modules: new Set([
"resource://gre/modules/nsAsyncShutdown.jsm", "resource://gre/modules/nsAsyncShutdown.jsm",
// Cookie banner handling.
"resource://gre/actors/CookieBannerChild.jsm",
// Test related // Test related
"chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm", "chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm",
"chrome://remote/content/shared/Log.jsm", "chrome://remote/content/shared/Log.jsm",

View file

@ -4,12 +4,8 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
}); });
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
// Various tests in this directory may define gTestBrowser, to use as the // Various tests in this directory may define gTestBrowser, to use as the
// default browser under test in some of the functions below. // default browser under test in some of the functions below.

View file

@ -2,7 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */ * http://creativecommons.org/publicdomain/zero/1.0/ */
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
const { Sqlite } = ChromeUtils.import("resource://gre/modules/Sqlite.jsm"); const { Sqlite } = ChromeUtils.importESModule(
"resource://gre/modules/Sqlite.sys.mjs"
);
XPCOMUtils.defineLazyServiceGetter( XPCOMUtils.defineLazyServiceGetter(
this, this,

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

@ -1,8 +1,6 @@
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
"WindowsRegistry", });
"resource://gre/modules/WindowsRegistry.jsm"
);
function getFirefoxExecutableFile() { function getFirefoxExecutableFile() {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);

View file

@ -409,8 +409,8 @@ add_task(async function checkAllTheCSS() {
// Create a clean iframe to load all the files into. This needs to live at a // Create a clean iframe to load all the files into. This needs to live at a
// chrome URI so that it's allowed to load and parse any styles. // chrome URI so that it's allowed to load and parse any styles.
let testFile = getRootDirectory(gTestPath) + "dummy_page.html"; let testFile = getRootDirectory(gTestPath) + "dummy_page.html";
let { HiddenFrame } = ChromeUtils.import( let { HiddenFrame } = ChromeUtils.importESModule(
"resource://gre/modules/HiddenFrame.jsm" "resource://gre/modules/HiddenFrame.sys.mjs"
); );
let hiddenFrame = new HiddenFrame(); let hiddenFrame = new HiddenFrame();
let win = await hiddenFrame.get(); let win = await hiddenFrame.get();

View file

@ -15,8 +15,8 @@ const { CustomizableUITestUtils } = ChromeUtils.import(
"resource://testing-common/CustomizableUITestUtils.jsm" "resource://testing-common/CustomizableUITestUtils.jsm"
); );
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
// These are brand names, proper names, or other things that we expect to // These are brand names, proper names, or other things that we expect to

View file

@ -3,8 +3,8 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
add_task(async function test_unconfigured_no_badge() { add_task(async function test_unconfigured_no_badge() {

View file

@ -58,8 +58,8 @@ function promisePopupNotificationShown(name) {
} }
function promiseAppMenuNotificationShown(id) { function promiseAppMenuNotificationShown(id) {
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
return new Promise(resolve => { return new Promise(resolve => {
function popupshown() { function popupshown() {

View file

@ -11,9 +11,12 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs" "resource://gre/modules/XPCOMUtils.sys.mjs"
); );
ChromeUtils.defineESModuleGetters(this, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyModuleGetters(this, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm", AboutNewTab: "resource:///modules/AboutNewTab.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm", BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
ContextualIdentityService: ContextualIdentityService:
"resource://gre/modules/ContextualIdentityService.jsm", "resource://gre/modules/ContextualIdentityService.jsm",

View file

@ -16,11 +16,14 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FirstStartup: "resource://gre/modules/FirstStartup.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm", BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
HeadlessShell: "resource:///modules/HeadlessShell.jsm", HeadlessShell: "resource:///modules/HeadlessShell.jsm",
HomePage: "resource:///modules/HomePage.jsm", HomePage: "resource:///modules/HomePage.jsm",
FirstStartup: "resource://gre/modules/FirstStartup.jsm",
LaterRun: "resource:///modules/LaterRun.jsm", LaterRun: "resource:///modules/LaterRun.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm", NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",

View file

@ -19,10 +19,15 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs", BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs", BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs", BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
Integration: "resource://gre/modules/Integration.sys.mjs",
Interactions: "resource:///modules/Interactions.sys.mjs", Interactions: "resource:///modules/Interactions.sys.mjs",
Log: "resource://gre/modules/Log.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
OsEnvironment: "resource://gre/modules/OsEnvironment.sys.mjs",
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs", PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs", PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs", PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
@ -30,16 +35,17 @@ ChromeUtils.defineESModuleGetters(lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs", ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs", SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs", SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs", UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
UrlbarQuickSuggest: "resource:///modules/UrlbarQuickSuggest.sys.mjs", UrlbarQuickSuggest: "resource:///modules/UrlbarQuickSuggest.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
}); });
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm", AboutNewTab: "resource:///modules/AboutNewTab.jsm",
ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm", ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.jsm",
ASRouterDefaultConfig: ASRouterDefaultConfig:
"resource://activity-stream/lib/ASRouterDefaultConfig.jsm", "resource://activity-stream/lib/ASRouterDefaultConfig.jsm",
ASRouterNewTabHook: "resource://activity-stream/lib/ASRouterNewTabHook.jsm", ASRouterNewTabHook: "resource://activity-stream/lib/ASRouterNewTabHook.jsm",
@ -63,16 +69,12 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
FeatureGate: "resource://featuregates/FeatureGate.jsm", FeatureGate: "resource://featuregates/FeatureGate.jsm",
FxAccounts: "resource://gre/modules/FxAccounts.jsm", FxAccounts: "resource://gre/modules/FxAccounts.jsm",
HomePage: "resource:///modules/HomePage.jsm", HomePage: "resource:///modules/HomePage.jsm",
Integration: "resource://gre/modules/Integration.jsm",
Log: "resource://gre/modules/Log.jsm",
LoginBreaches: "resource:///modules/LoginBreaches.jsm", LoginBreaches: "resource:///modules/LoginBreaches.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm", NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
Normandy: "resource://normandy/Normandy.jsm", Normandy: "resource://normandy/Normandy.jsm",
OnboardingMessageProvider: OnboardingMessageProvider:
"resource://activity-stream/lib/OnboardingMessageProvider.jsm", "resource://activity-stream/lib/OnboardingMessageProvider.jsm",
OsEnvironment: "resource://gre/modules/OsEnvironment.jsm",
PageActions: "resource:///modules/PageActions.jsm", PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm", PageThumbs: "resource://gre/modules/PageThumbs.jsm",
PdfJs: "resource://pdf.js/PdfJs.jsm", PdfJs: "resource://pdf.js/PdfJs.jsm",
@ -91,7 +93,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm", SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm", SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
ShellService: "resource:///modules/ShellService.jsm", ShellService: "resource:///modules/ShellService.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
SpecialMessageActions: SpecialMessageActions:
"resource://messaging-system/lib/SpecialMessageActions.jsm", "resource://messaging-system/lib/SpecialMessageActions.jsm",
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm", TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
@ -100,7 +101,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
TRRRacer: "resource:///modules/TRRPerformance.jsm", TRRRacer: "resource:///modules/TRRPerformance.jsm",
UIState: "resource://services-sync/UIState.jsm", UIState: "resource://services-sync/UIState.jsm",
WebChannel: "resource://gre/modules/WebChannel.jsm", WebChannel: "resource://gre/modules/WebChannel.jsm",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.jsm",
}); });
if (AppConstants.MOZ_UPDATER) { if (AppConstants.MOZ_UPDATER) {
@ -1388,8 +1388,8 @@ BrowserGlue.prototype = {
return; return;
} }
const { ResetProfile } = ChromeUtils.import( const { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.jsm" "resource://gre/modules/ResetProfile.sys.mjs"
); );
if (!ResetProfile.resetSupported()) { if (!ResetProfile.resetSupported()) {
return; return;
@ -1625,8 +1625,8 @@ BrowserGlue.prototype = {
); );
channel.listen((id, data, target) => { channel.listen((id, data, target) => {
if (data.command == "request") { if (data.command == "request") {
let { Troubleshoot } = ChromeUtils.import( let { Troubleshoot } = ChromeUtils.importESModule(
"resource://gre/modules/Troubleshoot.jsm" "resource://gre/modules/Troubleshoot.sys.mjs"
); );
Troubleshoot.snapshot(snapshotData => { Troubleshoot.snapshot(snapshotData => {
// for privacy we remove crash IDs and all preferences (but bug 1091944 // for privacy we remove crash IDs and all preferences (but bug 1091944
@ -1657,8 +1657,8 @@ BrowserGlue.prototype = {
// Check if we were just re-installed and offer Firefox Reset // Check if we were just re-installed and offer Firefox Reset
let updateChannel; let updateChannel;
try { try {
updateChannel = ChromeUtils.import( updateChannel = ChromeUtils.importESModule(
"resource://gre/modules/UpdateUtils.jsm" "resource://gre/modules/UpdateUtils.sys.mjs"
).UpdateUtils.UpdateChannel; ).UpdateUtils.UpdateChannel;
} catch (ex) {} } catch (ex) {}
if (updateChannel) { if (updateChannel) {
@ -2320,8 +2320,8 @@ BrowserGlue.prototype = {
} }
if (AppConstants.ASAN_REPORTER) { if (AppConstants.ASAN_REPORTER) {
var { AsanReporter } = ChromeUtils.import( var { AsanReporter } = ChromeUtils.importESModule(
"resource://gre/modules/AsanReporter.jsm" "resource://gre/modules/AsanReporter.sys.mjs"
); );
AsanReporter.init(); AsanReporter.init();
} }
@ -2940,8 +2940,8 @@ BrowserGlue.prototype = {
}, },
() => { () => {
let { GMPInstallManager } = ChromeUtils.import( let { GMPInstallManager } = ChromeUtils.importESModule(
"resource://gre/modules/GMPInstallManager.jsm" "resource://gre/modules/GMPInstallManager.sys.mjs"
); );
this._gmpInstallManager = new GMPInstallManager(); this._gmpInstallManager = new GMPInstallManager();
// We don't really care about the results, if someone is interested they // We don't really care about the results, if someone is interested they

View file

@ -22,13 +22,16 @@ const { E10SUtils } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
LoginBreaches: "resource:///modules/LoginBreaches.jsm", LoginBreaches: "resource:///modules/LoginBreaches.jsm",
LoginHelper: "resource://gre/modules/LoginHelper.jsm", LoginHelper: "resource://gre/modules/LoginHelper.jsm",
LoginExport: "resource://gre/modules/LoginExport.jsm", LoginExport: "resource://gre/modules/LoginExport.jsm",
LoginCSVImport: "resource://gre/modules/LoginCSVImport.jsm", LoginCSVImport: "resource://gre/modules/LoginCSVImport.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm", MigrationUtils: "resource:///modules/MigrationUtils.jsm",
OSKeyStore: "resource://gre/modules/OSKeyStore.jsm",
UIState: "resource://services-sync/UIState.jsm", UIState: "resource://services-sync/UIState.jsm",
}); });

View file

@ -8,8 +8,8 @@
* Test the export logins file picker appears. * Test the export logins file picker appears.
*/ */
let { OSKeyStore } = ChromeUtils.import( let { OSKeyStore } = ChromeUtils.importESModule(
"resource://gre/modules/OSKeyStore.jsm" "resource://gre/modules/OSKeyStore.sys.mjs"
); );
let { TelemetryTestUtils } = ChromeUtils.import( let { TelemetryTestUtils } = ChromeUtils.import(
"resource://testing-common/TelemetryTestUtils.jsm" "resource://testing-common/TelemetryTestUtils.jsm"

View file

@ -14,6 +14,10 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm", AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm",
@ -21,7 +25,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
CustomizableWidgets: "resource:///modules/CustomizableWidgets.jsm", CustomizableWidgets: "resource:///modules/CustomizableWidgets.jsm",
PanelMultiView: "resource:///modules/PanelMultiView.jsm", PanelMultiView: "resource:///modules/PanelMultiView.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm", BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
HomePage: "resource:///modules/HomePage.jsm", HomePage: "resource:///modules/HomePage.jsm",
}); });

View file

@ -21,10 +21,13 @@ const { PrivateBrowsingUtils } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
RecentlyClosedTabsAndWindowsMenuUtils: RecentlyClosedTabsAndWindowsMenuUtils:
"resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm", "resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
Sanitizer: "resource:///modules/Sanitizer.jsm", Sanitizer: "resource:///modules/Sanitizer.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm", SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
}); });

View file

@ -2,16 +2,10 @@
* 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/. */
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
"AppMenuNotifications", NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"resource://gre/modules/AppMenuNotifications.jsm" });
);
ChromeUtils.defineModuleGetter(
this,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
this, this,
"PanelMultiView", "PanelMultiView",

View file

@ -1,7 +1,7 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
/** /**

View file

@ -3,8 +3,8 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
/** /**

View file

@ -1,7 +1,7 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
add_task(async function testFullscreen() { add_task(async function testFullscreen() {

View file

@ -6,8 +6,8 @@
// error. // error.
SimpleTest.ignoreAllUncaughtExceptions(true); SimpleTest.ignoreAllUncaughtExceptions(true);
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
function waitForDocshellActivated() { function waitForDocshellActivated() {

View file

@ -3,8 +3,8 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
add_task(async function testModals() { add_task(async function testModals() {

View file

@ -1,7 +1,7 @@
"use strict"; "use strict";
const { AppMenuNotifications } = ChromeUtils.import( const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.jsm" "resource://gre/modules/AppMenuNotifications.sys.mjs"
); );
/** /**

View file

@ -361,8 +361,8 @@ DistributionCustomizer.prototype = {
return; return;
} }
let { ProfileAge } = ChromeUtils.import( let { ProfileAge } = ChromeUtils.importESModule(
"resource://gre/modules/ProfileAge.jsm" "resource://gre/modules/ProfileAge.sys.mjs"
); );
let profileAge = await ProfileAge(); let profileAge = await ProfileAge();
let resetDate = await profileAge.reset; let resetDate = await profileAge.reset;

View file

@ -5,8 +5,8 @@
"use strict"; "use strict";
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
const { PromiseUtils } = ChromeUtils.import( const { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.jsm" "resource://gre/modules/PromiseUtils.sys.mjs"
); );
const { TestUtils } = ChromeUtils.import( const { TestUtils } = ChromeUtils.import(

View file

@ -18,6 +18,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs", UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
}); });
@ -26,7 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
Downloads: "resource://gre/modules/Downloads.jsm", Downloads: "resource://gre/modules/Downloads.jsm",
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm", DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm", DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
}); });
XPCOMUtils.defineLazyServiceGetter( XPCOMUtils.defineLazyServiceGetter(
@ -43,8 +43,8 @@ XPCOMUtils.defineLazyServiceGetter(
Ci.nsIApplicationReputationService Ci.nsIApplicationReputationService
); );
const { Integration } = ChromeUtils.import( const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.jsm" "resource://gre/modules/Integration.sys.mjs"
); );
Integration.downloads.defineModuleGetter( Integration.downloads.defineModuleGetter(

View file

@ -37,11 +37,9 @@ XPCOMUtils.defineLazyServiceGetter(
"nsIMIMEService" "nsIMIMEService"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, Integration: "resource://gre/modules/Integration.sys.mjs",
"Integration", });
"resource://gre/modules/Integration.jsm"
);
const PREF_BRANCH = "browser.download.viewableInternally."; const PREF_BRANCH = "browser.download.viewableInternally.";
const PREF_ENABLED_TYPES = PREF_BRANCH + "enabledTypes"; const PREF_ENABLED_TYPES = PREF_BRANCH + "enabledTypes";

View file

@ -8,6 +8,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
); );
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
}); });
@ -16,7 +17,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Downloads: "resource://gre/modules/Downloads.jsm", Downloads: "resource://gre/modules/Downloads.jsm",
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm", DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm", DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm",
}); });

View file

@ -40,22 +40,18 @@ ChromeUtils.defineModuleGetter(
"DownloadsViewUI", "DownloadsViewUI",
"resource:///modules/DownloadsViewUI.jsm" "resource:///modules/DownloadsViewUI.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
"FileUtils", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
"resource://gre/modules/FileUtils.jsm" });
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
this, this,
"NetUtil", "NetUtil",
"resource://gre/modules/NetUtil.jsm" "resource://gre/modules/NetUtil.jsm"
); );
ChromeUtils.defineESModuleGetters(this, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
const { Integration } = ChromeUtils.import( const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.jsm" "resource://gre/modules/Integration.sys.mjs"
); );
/* global DownloadIntegration */ /* global DownloadIntegration */

View file

@ -50,13 +50,6 @@ const DownloadsButton = {
*/ */
_customizing: false, _customizing: false,
/**
* Indicates whether the button has been torn down.
* TODO: This is used for a temporary workaround for bug 1543537 and should be
* removed when fixed.
*/
_uninitialized: false,
/** /**
* This function is called asynchronously just after window initialization. * This function is called asynchronously just after window initialization.
* *
@ -171,9 +164,6 @@ const DownloadsButton = {
}, },
checkForAutoHide() { checkForAutoHide() {
if (this._uninitialized) {
return;
}
let button = this._placeholder; let button = this._placeholder;
if ( if (
!this._customizing && !this._customizing &&
@ -236,7 +226,6 @@ const DownloadsButton = {
}, },
uninit() { uninit() {
this._uninitialized = true;
CustomizableUI.removeListener(this); CustomizableUI.removeListener(this);
}, },

View file

@ -19,12 +19,8 @@ ChromeUtils.defineModuleGetter(
"DownloadsCommon", "DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm" "resource:///modules/DownloadsCommon.jsm"
); );
ChromeUtils.defineModuleGetter(
this,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
}); });
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(

View file

@ -8,11 +8,9 @@ ChromeUtils.defineModuleGetter(
"DownloadsCommon", "DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm" "resource:///modules/DownloadsCommon.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
"FileUtils", });
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
this, this,
"FileTestUtils", "FileTestUtils",

View file

@ -11,8 +11,8 @@ const SVG_MIME = "image/svg+xml";
const AVIF_MIME = "image/avif"; const AVIF_MIME = "image/avif";
const WEBP_MIME = "image/webp"; const WEBP_MIME = "image/webp";
const { Integration } = ChromeUtils.import( const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.jsm" "resource://gre/modules/Integration.sys.mjs"
); );
const { const {
DownloadsViewableInternally, DownloadsViewableInternally,

View file

@ -26,6 +26,7 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BookmarksPolicies: "resource:///modules/policies/BookmarksPolicies.sys.mjs", BookmarksPolicies: "resource:///modules/policies/BookmarksPolicies.sys.mjs",
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
ProxyPolicies: "resource:///modules/policies/ProxyPolicies.sys.mjs", ProxyPolicies: "resource:///modules/policies/ProxyPolicies.sys.mjs",
WebsiteFilter: "resource:///modules/policies/WebsiteFilter.sys.mjs", WebsiteFilter: "resource:///modules/policies/WebsiteFilter.sys.mjs",
}); });
@ -33,7 +34,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
CustomizableUI: "resource:///modules/CustomizableUI.jsm", CustomizableUI: "resource:///modules/CustomizableUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
}); });
const PREF_LOGLEVEL = "browser.policies.loglevel"; const PREF_LOGLEVEL = "browser.policies.loglevel";

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */ * http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict"; "use strict";
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
"UpdateUtils", });
"resource://gre/modules/UpdateUtils.jsm"
);
async function test_app_update_auto(expectedEnabled, expectedLocked) { async function test_app_update_auto(expectedEnabled, expectedLocked) {
let actualEnabled = await UpdateUtils.getAppUpdateAutoEnabled(); let actualEnabled = await UpdateUtils.getAppUpdateAutoEnabled();

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */ * http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict"; "use strict";
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
"UpdateUtils", });
"resource://gre/modules/UpdateUtils.jsm"
);
var updateService = Cc["@mozilla.org/updates/update-service;1"].getService( var updateService = Cc["@mozilla.org/updates/update-service;1"].getService(
Ci.nsIApplicationUpdateService Ci.nsIApplicationUpdateService
); );

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */ * http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict"; "use strict";
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
"UpdateUtils", });
"resource://gre/modules/UpdateUtils.jsm"
);
const PREF_NAME = "app.update.background.enabled"; const PREF_NAME = "app.update.background.enabled";

View file

@ -2,8 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */ * http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict"; "use strict";
let { ResetProfile } = ChromeUtils.import( let { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.jsm" "resource://gre/modules/ResetProfile.sys.mjs"
); );
// For this test to work properly, this profile actually needs to be // For this test to work properly, this profile actually needs to be

View file

@ -20,13 +20,9 @@ ChromeUtils.defineModuleGetter(
"BrowserWindowTracker", "BrowserWindowTracker",
"resource:///modules/BrowserWindowTracker.jsm" "resource:///modules/BrowserWindowTracker.jsm"
); );
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, { ChromeUtils.defineESModuleGetters(this, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs", AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
}); });
var { ExtensionError } = ExtensionUtils; var { ExtensionError } = ExtensionUtils;

View file

@ -26,11 +26,9 @@ ChromeUtils.defineModuleGetter(
"PrivateBrowsingUtils", "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm" "resource://gre/modules/PrivateBrowsingUtils.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
"PromiseUtils", });
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
this, this,
"SessionStore", "SessionStore",

View file

@ -6,9 +6,12 @@
"use strict"; "use strict";
ChromeUtils.defineESModuleGetters(this, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyModuleGetters(this, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm", AboutNewTab: "resource:///modules/AboutNewTab.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
shortURL: "resource://activity-stream/lib/ShortURL.jsm", shortURL: "resource://activity-stream/lib/ShortURL.jsm",
getSearchProvider: "resource://activity-stream/lib/SearchShortcuts.jsm", getSearchProvider: "resource://activity-stream/lib/SearchShortcuts.jsm",
}); });

View file

@ -7,14 +7,18 @@
// element's `open` property to go back to being `false` if forced to true // element's `open` property to go back to being `false` if forced to true
// synchronously in response to keydown. // synchronously in response to keydown.
async function focusButtonAndPressKeyWithDelay(key, elem, modifiers) { async function focusButtonAndPressKeyWithDelay(key, elem, modifiers) {
let focused = BrowserTestUtils.waitForEvent(elem, "focus", true);
elem.setAttribute("tabindex", "-1"); elem.setAttribute("tabindex", "-1");
elem.focus(); elem.focus();
elem.removeAttribute("tabindex"); elem.removeAttribute("tabindex");
await focused;
EventUtils.synthesizeKey(key, { type: "keydown", modifiers }); EventUtils.synthesizeKey(key, { type: "keydown", modifiers });
await new Promise(executeSoon); await new Promise(executeSoon);
EventUtils.synthesizeKey(key, { type: "keyup", modifiers }); EventUtils.synthesizeKey(key, { type: "keyup", modifiers });
let blurred = BrowserTestUtils.waitForEvent(elem, "blur", true);
elem.blur(); elem.blur();
await blurred;
} }
// This test verifies that pressing enter while a page action is focused // This test verifies that pressing enter while a page action is focused
@ -23,29 +27,25 @@ add_task(async function testKeyBrowserAction() {
let extension = ExtensionTestUtils.loadExtension({ let extension = ExtensionTestUtils.loadExtension({
manifest: { manifest: {
browser_action: {}, browser_action: {},
background: {
persistent: false,
scripts: ["background.js"],
},
}, },
files: { async background() {
"background.js": async function background() { let counter = 0;
let counter = 0;
function onClicked() { browser.browserAction.onClicked.addListener(() => {
dump("clicked\n"); counter++;
counter++; });
}
browser.browserAction.onClicked.addListener(onClicked); browser.test.onMessage.addListener(async msg => {
browser.test.assertEq(
"checkCounter",
msg,
"expected check counter message"
);
browser.test.sendMessage("counter", counter);
});
browser.test.onMessage.addListener(async msg => { browser.test.sendMessage("ready");
browser.test.sendMessage("counter", counter);
});
browser.test.sendMessage("ready");
},
}, },
}); });
@ -53,9 +53,12 @@ add_task(async function testKeyBrowserAction() {
await extension.awaitMessage("ready"); await extension.awaitMessage("ready");
let elem = getBrowserActionWidget(extension).forWindow(window).node; let elem = getBrowserActionWidget(extension).forWindow(window).node;
await promiseAnimationFrame(window);
await showBrowserAction(extension, window);
await focusButtonAndPressKeyWithDelay(" ", elem, {}); await focusButtonAndPressKeyWithDelay(" ", elem, {});
extension.sendMessage("checkCounter", {}); extension.sendMessage("checkCounter");
let counter = await extension.awaitMessage("counter"); let counter = await extension.awaitMessage("counter");
is(counter, 1, "Key only triggered button once"); is(counter, 1, "Key only triggered button once");

View file

@ -5,8 +5,8 @@
/* import-globals-from ../../../../../toolkit/components/extensions/test/mochitest/head_webrequest.js */ /* import-globals-from ../../../../../toolkit/components/extensions/test/mochitest/head_webrequest.js */
loadTestSubscript("head_webrequest.js"); loadTestSubscript("head_webrequest.js");
const { HiddenFrame } = ChromeUtils.import( const { HiddenFrame } = ChromeUtils.importESModule(
"resource://gre/modules/HiddenFrame.jsm" "resource://gre/modules/HiddenFrame.sys.mjs"
); );
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

View file

@ -10,11 +10,14 @@ const { AppConstants } = ChromeUtils.import(
); );
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyModuleGetters(this, {
Extension: "resource://gre/modules/Extension.jsm", Extension: "resource://gre/modules/Extension.jsm",
ExtensionData: "resource://gre/modules/Extension.jsm", ExtensionData: "resource://gre/modules/Extension.jsm",
ExtensionTestUtils: "resource://testing-common/ExtensionXPCShellUtils.jsm", ExtensionTestUtils: "resource://testing-common/ExtensionXPCShellUtils.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
HttpServer: "resource://testing-common/httpd.js", HttpServer: "resource://testing-common/httpd.js",
NetUtil: "resource://gre/modules/NetUtil.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm",
Schemas: "resource://gre/modules/Schemas.jsm", Schemas: "resource://gre/modules/Schemas.jsm",

View file

@ -5,10 +5,14 @@
const { AddonTestUtils } = ChromeUtils.import( const { AddonTestUtils } = ChromeUtils.import(
"resource://testing-common/AddonTestUtils.jsm" "resource://testing-common/AddonTestUtils.jsm"
); );
ChromeUtils.defineESModuleGetters(this, {
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyModuleGetters(this, {
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
HomePage: "resource:///modules/HomePage.jsm", HomePage: "resource:///modules/HomePage.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
RemoteSettings: "resource://services-settings/remote-settings.js", RemoteSettings: "resource://services-settings/remote-settings.js",
sinon: "resource://testing-common/Sinon.jsm", sinon: "resource://testing-common/Sinon.jsm",
}); });

View file

@ -3,8 +3,8 @@
const { PlacesUtils } = ChromeUtils.importESModule( const { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs" "resource://gre/modules/PlacesUtils.sys.mjs"
); );
const { NewTabUtils } = ChromeUtils.import( const { NewTabUtils } = ChromeUtils.importESModule(
"resource://gre/modules/NewTabUtils.jsm" "resource://gre/modules/NewTabUtils.sys.mjs"
); );
const { PlacesTestUtils } = ChromeUtils.importESModule( const { PlacesTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/PlacesTestUtils.sys.mjs" "resource://testing-common/PlacesTestUtils.sys.mjs"

View file

@ -34,12 +34,8 @@ XPCOMUtils.defineLazyPreferenceGetter(
_handlePrefChange _handlePrefChange
); );
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
const docWeak = Cu.getWeakReference(document);
async function _handlePrefChange() { async function _handlePrefChange() {
const doc = docWeak.get(); if (document.visibilityState === "hidden") {
if (!doc || doc.visibilityState === "hidden") {
return; return;
} }
let prefVal = lazy.featureTourProgress; let prefVal = lazy.featureTourProgress;
@ -50,7 +46,7 @@ async function _handlePrefChange() {
CURRENT_SCREEN = null; CURRENT_SCREEN = null;
} else if (prefVal.screen !== CURRENT_SCREEN?.id) { } else if (prefVal.screen !== CURRENT_SCREEN?.id) {
READY = false; READY = false;
const container = doc.getElementById(CONTAINER_ID); const container = document.getElementById(CONTAINER_ID);
container?.classList.add("hidden"); container?.classList.add("hidden");
// wait for fade out transition // wait for fade out transition
setTimeout(async () => { setTimeout(async () => {

View file

@ -12,8 +12,12 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
); );
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
Log: "resource://gre/modules/Log.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
Log: "resource://gre/modules/Log.jsm",
UIState: "resource://services-sync/UIState.jsm", UIState: "resource://services-sync/UIState.jsm",
SyncedTabs: "resource://services-sync/SyncedTabs.jsm", SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
Weave: "resource://services-sync/main.js", Weave: "resource://services-sync/main.js",

View file

@ -7,12 +7,8 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
); );
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
}); });

View file

@ -4,8 +4,8 @@
"use strict"; "use strict";
const { JsonSchema } = ChromeUtils.import( const { JsonSchema } = ChromeUtils.importESModule(
"resource://gre/modules/JsonSchema.jsm" "resource://gre/modules/JsonSchema.sys.mjs"
); );
const { TelemetryArchive } = ChromeUtils.import( const { TelemetryArchive } = ChromeUtils.import(

View file

@ -18,10 +18,7 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
}); Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
XPCOMUtils.defineLazyModuleGetters(lazy, {
Sqlite: "resource://gre/modules/Sqlite.jsm",
}); });
XPCOMUtils.defineLazyGetter( XPCOMUtils.defineLazyGetter(

View file

@ -20,7 +20,9 @@ const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs", PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
}); });
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
@ -28,16 +30,6 @@ ChromeUtils.defineModuleGetter(
"resource:///modules/sessionstore/SessionMigration.jsm" "resource:///modules/sessionstore/SessionMigration.jsm"
); );
ChromeUtils.defineModuleGetter(lazy, "OS", "resource://gre/modules/osfile.jsm"); ChromeUtils.defineModuleGetter(lazy, "OS", "resource://gre/modules/osfile.jsm");
ChromeUtils.defineModuleGetter(
lazy,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"ProfileAge",
"resource://gre/modules/ProfileAge.jsm"
);
function FirefoxProfileMigrator() { function FirefoxProfileMigrator() {
this.wrappedJSObject = this; // for testing... this.wrappedJSObject = this; // for testing...

View file

@ -18,12 +18,8 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
}); });
ChromeUtils.defineModuleGetter(
lazy,
"WindowsRegistry",
"resource://gre/modules/WindowsRegistry.jsm"
);
const { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm"); const { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
const EDGE_COOKIE_PATH_OPTIONS = ["", "#!001\\", "#!002\\"]; const EDGE_COOKIE_PATH_OPTIONS = ["", "#!001\\", "#!002\\"];

View file

@ -21,32 +21,16 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs", BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
ResponsivenessMonitor: "resource://gre/modules/ResponsivenessMonitor.sys.mjs",
Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
}); });
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"LoginHelper", "LoginHelper",
"resource://gre/modules/LoginHelper.jsm" "resource://gre/modules/LoginHelper.jsm"
); );
ChromeUtils.defineModuleGetter(
lazy,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"ResponsivenessMonitor",
"resource://gre/modules/ResponsivenessMonitor.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"Sqlite",
"resource://gre/modules/Sqlite.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"WindowsRegistry",
"resource://gre/modules/WindowsRegistry.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"setTimeout", "setTimeout",

View file

@ -4,8 +4,8 @@
"use strict"; "use strict";
const { FileUtils } = ChromeUtils.import( const { FileUtils } = ChromeUtils.importESModule(
"resource://gre/modules/FileUtils.jsm" "resource://gre/modules/FileUtils.sys.mjs"
); );
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
const { MigrationUtils, MigratorPrototype } = ChromeUtils.import( const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
@ -14,14 +14,10 @@ const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"PropertyListUtils",
"resource://gre/modules/PropertyListUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PropertyListUtils: "resource://gre/modules/PropertyListUtils.sys.mjs",
}); });
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,

View file

@ -13,8 +13,8 @@ var { PlacesUtils } = ChromeUtils.importESModule(
var { Preferences } = ChromeUtils.import( var { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm" "resource://gre/modules/Preferences.jsm"
); );
var { PromiseUtils } = ChromeUtils.import( var { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.jsm" "resource://gre/modules/PromiseUtils.sys.mjs"
); );
var { XPCOMUtils } = ChromeUtils.importESModule( var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs" "resource://gre/modules/XPCOMUtils.sys.mjs"
@ -26,16 +26,10 @@ var { PlacesTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/PlacesTestUtils.sys.mjs" "resource://testing-common/PlacesTestUtils.sys.mjs"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(this, {
this, FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
"FileUtils", Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
"resource://gre/modules/FileUtils.jsm" });
);
ChromeUtils.defineModuleGetter(
this,
"Sqlite",
"resource://gre/modules/Sqlite.jsm"
);
// Initialize profile. // Initialize profile.
var gProfD = do_get_profile(); var gProfD = do_get_profile();

View file

@ -13,12 +13,13 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs", Region: "resource://gre/modules/Region.sys.mjs",
}); });
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm", BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
FxAccounts: "resource://gre/modules/FxAccounts.jsm", FxAccounts: "resource://gre/modules/FxAccounts.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm", MigrationUtils: "resource:///modules/MigrationUtils.jsm",
@ -28,7 +29,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm", "resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm",
AboutWelcomeDefaults: AboutWelcomeDefaults:
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeDefaults.jsm", "resource://activity-stream/aboutwelcome/lib/AboutWelcomeDefaults.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
ShellService: "resource:///modules/ShellService.jsm", ShellService: "resource:///modules/ShellService.jsm",
LangPackMatcher: "resource://gre/modules/LangPackMatcher.jsm", LangPackMatcher: "resource://gre/modules/LangPackMatcher.jsm",
}); });

View file

@ -221,6 +221,11 @@ html {
--mr-screen-background-color: #62697A; --mr-screen-background-color: #62697A;
} }
} }
@media (prefers-contrast) {
.onboardingContainer {
--mr-screen-background-color: #F8F6F4;
}
}
@media (prefers-contrast: more) { @media (prefers-contrast: more) {
.onboardingContainer { .onboardingContainer {
background-color: var(--in-content-page-background); background-color: var(--in-content-page-background);

View file

@ -14,11 +14,14 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonRepository: "resource://gre/modules/addons/AddonRepository.jsm", AddonRepository: "resource://gre/modules/addons/AddonRepository.jsm",
AttributionCode: "resource:///modules/AttributionCode.jsm", AttributionCode: "resource:///modules/AttributionCode.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm", BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
}); });
XPCOMUtils.defineLazyPreferenceGetter( XPCOMUtils.defineLazyPreferenceGetter(

View file

@ -89,6 +89,10 @@ html {
--mr-screen-background-color: #62697A; --mr-screen-background-color: #62697A;
} }
@media (prefers-contrast) {
--mr-screen-background-color: #F8F6F4;
}
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Ubuntu', font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Ubuntu',
'Helvetica Neue', sans-serif; 'Helvetica Neue', sans-serif;
font-size: 16px; font-size: 16px;

View file

@ -12,8 +12,8 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const { AppConstants } = ChromeUtils.import( const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
const { NewTabUtils } = ChromeUtils.import( const { NewTabUtils } = ChromeUtils.importESModule(
"resource://gre/modules/NewTabUtils.jsm" "resource://gre/modules/NewTabUtils.sys.mjs"
); );
const { ShellService } = ChromeUtils.import( const { ShellService } = ChromeUtils.import(
"resource:///modules/ShellService.jsm" "resource:///modules/ShellService.jsm"
@ -22,6 +22,7 @@ const { ShellService } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs", Region: "resource://gre/modules/Region.sys.mjs",
}); });
@ -29,7 +30,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
ASRouterPreferences: "resource://activity-stream/lib/ASRouterPreferences.jsm", ASRouterPreferences: "resource://activity-stream/lib/ASRouterPreferences.jsm",
AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManager: "resource://gre/modules/AddonManager.jsm",
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm", ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
ProfileAge: "resource://gre/modules/ProfileAge.jsm",
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm", TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm",
AttributionCode: "resource:///modules/AttributionCode.jsm", AttributionCode: "resource:///modules/AttributionCode.jsm",
TargetingContext: "resource://messaging-system/targeting/Targeting.jsm", TargetingContext: "resource://messaging-system/targeting/Targeting.jsm",

View file

@ -11,10 +11,10 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs", AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
}); });
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
EveryWindow: "resource:///modules/EveryWindow.jsm", EveryWindow: "resource:///modules/EveryWindow.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
}); });

View file

@ -4,11 +4,9 @@
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, IndexedDB: "resource://gre/modules/IndexedDB.sys.mjs",
"IndexedDB", });
"resource://gre/modules/IndexedDB.jsm"
);
class ActivityStreamStorage { class ActivityStreamStorage {
/** /**

View file

@ -4,11 +4,10 @@
"use strict"; "use strict";
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"NewTabUtils", Region: "resource://gre/modules/Region.sys.mjs",
"resource://gre/modules/NewTabUtils.jsm" });
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"RemoteSettings", "RemoteSettings",
@ -25,9 +24,6 @@ const { setTimeout, clearTimeout } = ChromeUtils.import(
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import( const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
"resource://activity-stream/common/Actions.jsm" "resource://activity-stream/common/Actions.jsm"
); );
ChromeUtils.defineESModuleGetters(lazy, {
Region: "resource://gre/modules/Region.sys.mjs",
});
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"PersistentCache", "PersistentCache",

View file

@ -11,11 +11,14 @@ const { actionTypes: at } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm", DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm", DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
}); });
const DOWNLOAD_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for downloads changed events const DOWNLOAD_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for downloads changed events

View file

@ -16,13 +16,9 @@ const { RemoteSettings } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
}); });
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
const MIN_FAVICON_SIZE = 96; const MIN_FAVICON_SIZE = 96;

View file

@ -33,11 +33,9 @@ ChromeUtils.defineModuleGetter(
"LinksCache", "LinksCache",
"resource://activity-stream/lib/LinksCache.jsm" "resource://activity-stream/lib/LinksCache.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"NewTabUtils", });
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"Screenshots", "Screenshots",

View file

@ -16,8 +16,11 @@ const { FeatureCalloutMessages } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, { XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
ShellService: "resource:///modules/ShellService.jsm", ShellService: "resource:///modules/ShellService.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm", BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm", NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
@ -299,7 +302,7 @@ const BASE_MESSAGES = () => [
string_id: "mr2022-onboarding-colorway-label-default", string_id: "mr2022-onboarding-colorway-label-default",
}, },
tooltip: { tooltip: {
string_id: "mr2022-onboarding-colorway-tooltip-default", string_id: "mr2022-onboarding-colorway-tooltip-default2",
}, },
description: { description: {
string_id: "mr2022-onboarding-colorway-description-default", string_id: "mr2022-onboarding-colorway-description-default",
@ -399,6 +402,7 @@ const BASE_MESSAGES = () => [
label: { label: {
string_id: "mr2022-onboarding-existing-colorway-checkbox-label", string_id: "mr2022-onboarding-existing-colorway-checkbox-label",
}, },
defaultValue: true,
action: { action: {
type: "CONFIGURE_HOMEPAGE", type: "CONFIGURE_HOMEPAGE",
data: { homePage: "default", newtab: "default" }, data: { homePage: "default", newtab: "default" },

View file

@ -17,11 +17,9 @@ ChromeUtils.defineModuleGetter(
"resource://services-settings/Utils.jsm" "resource://services-settings/Utils.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"NewTabUtils", });
"resource://gre/modules/NewTabUtils.jsm"
);
const { BasePromiseWorker } = ChromeUtils.import( const { BasePromiseWorker } = ChromeUtils.import(
"resource://gre/modules/PromiseWorker.jsm" "resource://gre/modules/PromiseWorker.jsm"

View file

@ -21,19 +21,15 @@ const { AboutNewTab } = ChromeUtils.import(
const lazy = {}; const lazy = {};
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"NewTabUtils", PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
"resource://gre/modules/NewTabUtils.jsm" });
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"PartnerLinkAttribution", "PartnerLinkAttribution",
"resource:///modules/PartnerLinkAttribution.jsm" "resource:///modules/PartnerLinkAttribution.jsm"
); );
ChromeUtils.defineESModuleGetters(lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"PrivateBrowsingUtils", "PrivateBrowsingUtils",

View file

@ -3,9 +3,11 @@
* 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"; "use strict";
const { JSONFile } = ChromeUtils.import("resource://gre/modules/JSONFile.jsm"); const { JSONFile } = ChromeUtils.importESModule(
const { PromiseUtils } = ChromeUtils.import( "resource://gre/modules/JSONFile.sys.mjs"
"resource://gre/modules/PromiseUtils.jsm" );
const { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.sys.mjs"
); );
const { RemoteSettings } = ChromeUtils.import( const { RemoteSettings } = ChromeUtils.import(
"resource://services-settings/remote-settings.js" "resource://services-settings/remote-settings.js"

View file

@ -43,11 +43,9 @@ ChromeUtils.defineModuleGetter(
"UTEventReporting", "UTEventReporting",
"resource://activity-stream/lib/UTEventReporting.jsm" "resource://activity-stream/lib/UTEventReporting.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
"UpdateUtils", });
"resource://gre/modules/UpdateUtils.jsm"
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"HomePage", "HomePage",

View file

@ -47,11 +47,10 @@ ChromeUtils.defineModuleGetter(
"LinksCache", "LinksCache",
"resource://activity-stream/lib/LinksCache.jsm" "resource://activity-stream/lib/LinksCache.jsm"
); );
ChromeUtils.defineModuleGetter( ChromeUtils.defineESModuleGetters(lazy, {
lazy, NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
"NewTabUtils", Region: "resource://gre/modules/Region.sys.mjs",
"resource://gre/modules/NewTabUtils.jsm" });
);
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"Screenshots", "Screenshots",
@ -67,9 +66,6 @@ ChromeUtils.defineModuleGetter(
"RemoteSettings", "RemoteSettings",
"resource://services-settings/remote-settings.js" "resource://services-settings/remote-settings.js"
); );
ChromeUtils.defineESModuleGetters(lazy, {
Region: "resource://gre/modules/Region.sys.mjs",
});
XPCOMUtils.defineLazyGetter(lazy, "log", () => { XPCOMUtils.defineLazyGetter(lazy, "log", () => {
const { Logger } = ChromeUtils.import( const { Logger } = ChromeUtils.import(

View file

@ -3,10 +3,6 @@
* 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"; "use strict";
const { NewTabUtils } = ChromeUtils.import(
"resource://gre/modules/NewTabUtils.jsm"
);
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import( const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
"resource://activity-stream/common/Actions.jsm" "resource://activity-stream/common/Actions.jsm"
); );
@ -24,6 +20,11 @@ const { PersistentCache } = ChromeUtils.import(
); );
const lazy = {}; const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter( ChromeUtils.defineModuleGetter(
lazy, lazy,
"pktApi", "pktApi",
@ -252,7 +253,7 @@ class TopStoriesFeed {
} }
const calcResult = items const calcResult = items
.filter(s => !NewTabUtils.blockedLinks.isBlocked({ url: s.url })) .filter(s => !lazy.NewTabUtils.blockedLinks.isBlocked({ url: s.url }))
.map(s => { .map(s => {
let mapped = { let mapped = {
guid: s.id, guid: s.id,

Some files were not shown because too many files have changed in this diff Show more