Bug 1610653 - Part 8: Do not use global this property assignment to define global variable in services/sync. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D144115
This commit is contained in:
Tooru Fujisawa 2022-05-30 15:19:38 +00:00
parent be59015b9b
commit b2f0fcf3c4
2 changed files with 5 additions and 5 deletions

View File

@ -23,9 +23,9 @@ XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
return ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js");
});
this.EXPORTED_SYMBOLS = ["SyncDisconnectInternal", "SyncDisconnect"];
const EXPORTED_SYMBOLS = ["SyncDisconnectInternal", "SyncDisconnect"];
this.SyncDisconnectInternal = {
const SyncDisconnectInternal = {
lockRetryInterval: 1000, // wait 1 seconds before trying for the lock again.
lockRetryCount: 120, // Try 120 times (==2 mins) before giving up in disgust.
promiseDisconnectFinished: null, // If we are sanitizing, a promise for completion.
@ -226,7 +226,7 @@ this.SyncDisconnectInternal = {
},
};
this.SyncDisconnect = {
const SyncDisconnect = {
get promiseDisconnectFinished() {
return SyncDisconnectInternal.promiseDisconnectFinished;
},

View File

@ -62,7 +62,7 @@ XPCOMUtils.defineLazyGetter(this, "PREFS_DOC_URL", () =>
);
// Check for a local control pref or PREF_SYNC_PREFS_ARBITRARY
this.isAllowedPrefName = function(prefName) {
function isAllowedPrefName(prefName) {
if (prefName == PREF_SYNC_PREFS_ARBITRARY) {
return false; // never allow this.
}
@ -80,7 +80,7 @@ this.isAllowedPrefName = function(prefName) {
} catch (_) {
return false;
}
};
}
function PrefRec(collection, id) {
CryptoWrapper.call(this, collection, id);