зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1824608 - Convert toolkit/components/resistfingerprinting to ES modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D173659
This commit is contained in:
Родитель
2646639210
Коммит
190fd21569
|
@ -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";
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
|
@ -22,5 +22,5 @@ EXPORTS.mozilla += [
|
|||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
"RFPHelper.jsm",
|
||||
"RFPHelper.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";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче