Bug 1761326 - Import TelemetryTimestamps without target option of ChromeUtils.import r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D141985
This commit is contained in:
Rob Wu 2022-03-25 13:16:12 +00:00
Родитель a85c5c9ef0
Коммит 398deea5b2
1 изменённых файлов: 2 добавлений и 7 удалений

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

@ -91,6 +91,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
AbuseReporter: "resource://gre/modules/AbuseReporter.jsm",
Extension: "resource://gre/modules/Extension.jsm",
RemoteSettings: "resource://services-settings/remote-settings.js",
TelemetryTimestamps: "resource://gre/modules/TelemetryTimestamps.jsm",
});
XPCOMUtils.defineLazyPreferenceGetter(
@ -516,7 +517,7 @@ var AddonManagerInternal = {
externalExtensionLoaders: new Map(),
recordTimestamp(name, value) {
this.TelemetryTimestamps.add(name, value);
TelemetryTimestamps.add(name, value);
},
/**
@ -5035,12 +5036,6 @@ AddonManager.init();
// Setup the AMTelemetry once the AddonManager has been started.
AddonManager.addManagerListener(AMTelemetry);
// load the timestamps module into AddonManagerInternal
ChromeUtils.import(
"resource://gre/modules/TelemetryTimestamps.jsm",
AddonManagerInternal
);
Object.freeze(AddonManagerInternal);
Object.freeze(AddonManagerPrivate);
Object.freeze(AddonManager);