diff --git a/browser/actors/RFPHelperParent.sys.mjs b/browser/actors/RFPHelperParent.sys.mjs index d83c010a6a37..0e4e3e8be642 100644 --- a/browser/actors/RFPHelperParent.sys.mjs +++ b/browser/actors/RFPHelperParent.sys.mjs @@ -6,11 +6,9 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {}; -ChromeUtils.defineModuleGetter( - lazy, - "RFPHelper", - "resource://gre/modules/RFPHelper.jsm" -); +ChromeUtils.defineESModuleGetters(lazy, { + RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", +}); const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing"; diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs index 5333e1031386..4b21c32b64fd 100644 --- a/browser/components/BrowserGlue.sys.mjs +++ b/browser/components/BrowserGlue.sys.mjs @@ -50,6 +50,7 @@ ChromeUtils.defineESModuleGetters(lazy, { PublicSuffixList: "resource://gre/modules/netwerk-dns/PublicSuffixList.sys.mjs", QuickSuggest: "resource:///modules/QuickSuggest.sys.mjs", + RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", RemoteSecuritySettings: "resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs", @@ -100,7 +101,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, { PdfJs: "resource://pdf.js/PdfJs.jsm", PluralForm: "resource://gre/modules/PluralForm.jsm", ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm", - RFPHelper: "resource://gre/modules/RFPHelper.jsm", SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm", Sanitizer: "resource:///modules/Sanitizer.jsm", SaveToPocket: "chrome://pocket/content/SaveToPocket.jsm", diff --git a/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js b/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js index 3c5dc5e74515..e6a77bfb598d 100644 --- a/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js +++ b/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js @@ -10,8 +10,8 @@ * example. */ -const { RFPHelper } = ChromeUtils.import( - "resource://gre/modules/RFPHelper.jsm" +const { RFPHelper } = ChromeUtils.importESModule( + "resource://gre/modules/RFPHelper.sys.mjs" ); // A set of test cases which defines the width and the height of the outer window. diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 361a39f89893..9a5a98b7d807 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -13020,7 +13020,7 @@ value: true mirror: always -# The log level for browser console messages logged in RFPHelper.jsm. Change to +# The log level for browser console messages logged in RFPHelper.sys.mjs. Change to # 'All' and restart to see the messages. - name: privacy.resistFingerprinting.jsmloglevel type: String diff --git a/toolkit/components/resistfingerprinting/RFPHelper.jsm b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs similarity index 98% rename from toolkit/components/resistfingerprinting/RFPHelper.jsm rename to toolkit/components/resistfingerprinting/RFPHelper.sys.mjs index 326701ff13eb..ac15846d17eb 100644 --- a/toolkit/components/resistfingerprinting/RFPHelper.jsm +++ b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs @@ -2,13 +2,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -"use strict"; -var EXPORTED_SYMBOLS = ["RFPHelper"]; - -const { XPCOMUtils } = ChromeUtils.importESModule( - "resource://gre/modules/XPCOMUtils.sys.mjs" -); +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const kPrefResistFingerprinting = "privacy.resistFingerprinting"; const kPrefSpoofEnglish = "privacy.spoof_english"; @@ -648,4 +643,4 @@ class _RFPHelper { } } -let RFPHelper = new _RFPHelper(); +export let RFPHelper = new _RFPHelper(); diff --git a/toolkit/components/resistfingerprinting/moz.build b/toolkit/components/resistfingerprinting/moz.build index ce6dd42dd079..75779374317f 100644 --- a/toolkit/components/resistfingerprinting/moz.build +++ b/toolkit/components/resistfingerprinting/moz.build @@ -22,5 +22,5 @@ EXPORTS.mozilla += [ ] EXTRA_JS_MODULES += [ - "RFPHelper.jsm", + "RFPHelper.sys.mjs", ] diff --git a/toolkit/modules/FinderParent.sys.mjs b/toolkit/modules/FinderParent.sys.mjs index 4aef4823d65a..62851edb36df 100644 --- a/toolkit/modules/FinderParent.sys.mjs +++ b/toolkit/modules/FinderParent.sys.mjs @@ -14,13 +14,9 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { GetClipboardSearchString: "resource://gre/modules/Finder.sys.mjs", + RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", Rect: "resource://gre/modules/Geometry.sys.mjs", }); -ChromeUtils.defineModuleGetter( - lazy, - "RFPHelper", - "resource://gre/modules/RFPHelper.jsm" -); const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";