Bug 684121 - Don't access Services.appinfo at import time r?rnewman
As stated by Philipp, the prefs engine (PREFS_GUID) accesses Services.appinfo at import time.
Changed code to use a lazy getter on the global object instead.
changed services/sync/modules/engines/prefs.js
MozReview-Commit-ID: 1MAGKM9r1OM
--- a/services/sync/modules/engines/prefs.js
+++ b/services/sync/modules/engines/prefs.js
@@ -17,17 +17,18 @@ Cu.import("resource://services-sync/engi
Cu.import("resource://services-sync/record.js");
Cu.import("resource://services-sync/util.js");
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://services-common/utils.js");
XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
"resource://gre/modules/LightweightThemeManager.jsm");
-const PREFS_GUID = CommonUtils.encodeBase64URL(Services.appinfo.ID);
+XPCOMUtils.defineLazyGetter(this, "PREFS_GUID",
+ () => CommonUtils.encodeBase64URL(Services.appinfo.ID));
this.PrefRec = function PrefRec(collection, id) {
CryptoWrapper.call(this, collection, id);
}
PrefRec.prototype = {
__proto__: CryptoWrapper.prototype,
_logName: "Sync.Record.Pref",
};