Bug 1821158 - Convert browser/actors/RFPHelper* JSMs to ESMs updated r=kpatenio

Differential Revision: https://phabricator.services.mozilla.com/D172899
This commit is contained in:
Abhishek Tiwari 2023-03-22 16:00:00 +00:00
Родитель f62821e990
Коммит 62dfc2f2a3
4 изменённых файлов: 8 добавлений и 15 удалений

Просмотреть файл

@ -3,11 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["RFPHelperChild"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
@ -20,7 +16,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
class RFPHelperChild extends JSWindowActorChild {
export class RFPHelperChild extends JSWindowActorChild {
handleEvent(event) {
if (lazy.isLetterboxingEnabled && event.type == "resize") {
this.sendAsyncMessage("Letterboxing:ContentSizeUpdated");

Просмотреть файл

@ -3,11 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["RFPHelperParent"];
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
@ -24,7 +21,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
class RFPHelperParent extends JSWindowActorParent {
export class RFPHelperParent extends JSWindowActorParent {
receiveMessage(aMessage) {
if (
lazy.isLetterboxingEnabled &&

Просмотреть файл

@ -77,8 +77,8 @@ FINAL_TARGET_FILES.actors += [
"PromptParent.sys.mjs",
"RefreshBlockerChild.jsm",
"RefreshBlockerParent.jsm",
"RFPHelperChild.jsm",
"RFPHelperParent.jsm",
"RFPHelperChild.sys.mjs",
"RFPHelperParent.sys.mjs",
"ScreenshotsComponentChild.sys.mjs",
"SearchSERPTelemetryChild.sys.mjs",
"SearchSERPTelemetryParent.sys.mjs",

Просмотреть файл

@ -312,10 +312,10 @@ class _RFPHelper {
_registerActor() {
ChromeUtils.registerWindowActor("RFPHelper", {
parent: {
moduleURI: "resource:///actors/RFPHelperParent.jsm",
esModuleURI: "resource:///actors/RFPHelperParent.sys.mjs",
},
child: {
moduleURI: "resource:///actors/RFPHelperChild.jsm",
esModuleURI: "resource:///actors/RFPHelperChild.sys.mjs",
events: {
resize: {},
},