mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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:
parent
be59015b9b
commit
b2f0fcf3c4
@ -23,9 +23,9 @@ XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
|
|||||||
return ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js");
|
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.
|
lockRetryInterval: 1000, // wait 1 seconds before trying for the lock again.
|
||||||
lockRetryCount: 120, // Try 120 times (==2 mins) before giving up in disgust.
|
lockRetryCount: 120, // Try 120 times (==2 mins) before giving up in disgust.
|
||||||
promiseDisconnectFinished: null, // If we are sanitizing, a promise for completion.
|
promiseDisconnectFinished: null, // If we are sanitizing, a promise for completion.
|
||||||
@ -226,7 +226,7 @@ this.SyncDisconnectInternal = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.SyncDisconnect = {
|
const SyncDisconnect = {
|
||||||
get promiseDisconnectFinished() {
|
get promiseDisconnectFinished() {
|
||||||
return SyncDisconnectInternal.promiseDisconnectFinished;
|
return SyncDisconnectInternal.promiseDisconnectFinished;
|
||||||
},
|
},
|
||||||
|
@ -62,7 +62,7 @@ XPCOMUtils.defineLazyGetter(this, "PREFS_DOC_URL", () =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check for a local control pref or PREF_SYNC_PREFS_ARBITRARY
|
// Check for a local control pref or PREF_SYNC_PREFS_ARBITRARY
|
||||||
this.isAllowedPrefName = function(prefName) {
|
function isAllowedPrefName(prefName) {
|
||||||
if (prefName == PREF_SYNC_PREFS_ARBITRARY) {
|
if (prefName == PREF_SYNC_PREFS_ARBITRARY) {
|
||||||
return false; // never allow this.
|
return false; // never allow this.
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ this.isAllowedPrefName = function(prefName) {
|
|||||||
} catch (_) {
|
} catch (_) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function PrefRec(collection, id) {
|
function PrefRec(collection, id) {
|
||||||
CryptoWrapper.call(this, collection, id);
|
CryptoWrapper.call(this, collection, id);
|
||||||
|
Loading…
Reference in New Issue
Block a user