зеркало из https://github.com/mozilla/gecko-dev.git
Bug 986501 - Avoid unnecessary compartments on Sync startup r=markh
MozReview-Commit-ID: 8Rr3JD4dfVy --HG-- extra : rebase_source : b18f24229bbd1caf80d9f175a79c1fdb0aeccd0d
This commit is contained in:
Родитель
4329ee3ef3
Коммит
c05723ef0c
|
@ -13,7 +13,6 @@ Cu.import("resource://gre/modules/Services.jsm");
|
|||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm", this);
|
||||
Cu.import("resource://services-sync/main.js");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
|
||||
|
@ -24,6 +23,9 @@ XPCOMUtils.defineLazyGetter(this, "weaveXPCService", function() {
|
|||
.wrappedJSObject;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
|
||||
// from MDN...
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
|
@ -294,4 +296,3 @@ this.SyncedTabs = {
|
|||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ this.EXPORTED_SYMBOLS = ["BookmarkRepairRequestor", "BookmarkRepairResponder"];
|
|||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-sync/collection_repair.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
|
@ -21,6 +19,9 @@ Cu.import("resource://services-sync/doctor.js");
|
|||
Cu.import("resource://services-sync/telemetry.js");
|
||||
Cu.import("resource://services-common/utils.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesSyncUtils",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
|
||||
const log = Log.repository.getLogger("Sync.Engine.Bookmarks.Repair");
|
||||
|
||||
const PREF_BRANCH = "services.sync.repairs.bookmarks.";
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
|
||||
const { interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
Cu.import("resource://gre/modules/Timer.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://services-common/utils.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesSyncUtils",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
|
||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["BookmarkValidator", "BookmarkProblemData"];
|
||||
|
@ -849,4 +852,3 @@ class BookmarkValidator {
|
|||
}
|
||||
|
||||
BookmarkValidator.prototype.version = BOOKMARK_VALIDATOR_VERSION;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ Cu.import("resource://services-common/utils.js");
|
|||
Cu.import("resource://services-common/tokenserverclient.js");
|
||||
Cu.import("resource://services-crypto/utils.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-common/tokenserverclient.js");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://services-sync/record.js");
|
||||
Cu.import("resource://services-sync/main.js");
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["CollectionValidator", "CollectionProblemData"];
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ var Cc = Components.classes;
|
|||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
|
@ -19,7 +17,7 @@ Cu.import("resource://services-sync/engines.js");
|
|||
Cu.import("resource://services-sync/record.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
Cu.import("resource://gre/modules/PlacesBackups.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkValidator",
|
||||
"resource://services-sync/bookmark_validator.js");
|
||||
XPCOMUtils.defineLazyGetter(this, "PlacesBundle", () => {
|
||||
|
@ -27,6 +25,12 @@ XPCOMUtils.defineLazyGetter(this, "PlacesBundle", () => {
|
|||
.getService(Ci.nsIStringBundleService);
|
||||
return bundleService.createBundle("chrome://places/locale/places.properties");
|
||||
});
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesSyncUtils",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups",
|
||||
"resource://gre/modules/PlacesBackups.jsm");
|
||||
|
||||
const ANNOS_TO_TRACK = [PlacesSyncUtils.bookmarks.DESCRIPTION_ANNO,
|
||||
PlacesSyncUtils.bookmarks.SIDEBAR_ANNO,
|
||||
|
|
|
@ -14,10 +14,6 @@ Cu.import("resource://services-sync/util.js");
|
|||
Cu.import("resource://services-common/async.js");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "extensionStorageSync",
|
||||
"resource://gre/modules/ExtensionStorageSync.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
|
||||
"resource://gre/modules/FxAccounts.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||
"resource://gre/modules/Task.jsm");
|
||||
|
||||
/**
|
||||
* The Engine that manages syncing for the web extension "storage"
|
||||
|
|
|
@ -11,15 +11,16 @@ var Cr = Components.results;
|
|||
|
||||
const HISTORY_TTL = 5184000; // 60 days
|
||||
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm", this);
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://services-sync/engines.js");
|
||||
Cu.import("resource://services-sync/record.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
|
||||
this.HistoryRec = function HistoryRec(collection, id) {
|
||||
CryptoWrapper.call(this, collection, id);
|
||||
}
|
||||
|
|
|
@ -15,9 +15,11 @@ 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");
|
||||
Cu.import("resource://gre/modules/LightweightThemeManager.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
|
||||
"resource://gre/modules/LightweightThemeManager.jsm");
|
||||
|
||||
const PREFS_GUID = CommonUtils.encodeBase64URL(Services.appinfo.ID);
|
||||
|
||||
this.PrefRec = function PrefRec(collection, id) {
|
||||
|
|
|
@ -9,10 +9,8 @@ var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
|||
const TABS_TTL = 1814400; // 21 days.
|
||||
const TAB_ENTRIES_LIMIT = 5; // How many URLs to include in tab history.
|
||||
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://services-sync/engines.js");
|
||||
Cu.import("resource://services-sync/engines/clients.js");
|
||||
Cu.import("resource://services-sync/record.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
|
|
|
@ -11,7 +11,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
|||
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://services-sync/engines.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-common/logmanager.js");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
|
|
|
@ -12,7 +12,6 @@ var Ci = Components.interfaces;
|
|||
var Cr = Components.results;
|
||||
var Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-common/rest.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["SyncStorageRequest"];
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ const PBKDF2_KEY_BYTES = 16;
|
|||
const CRYPTO_COLLECTION = "crypto";
|
||||
const KEYS_WBO = "keys";
|
||||
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
|
|
|
@ -12,12 +12,8 @@ var {utils: Cu} = Components;
|
|||
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://services-sync/engines.js");
|
||||
Cu.import("resource://services-sync/policies.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-common/observers.js");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Doctor",
|
||||
"resource://services-sync/doctor.js");
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ Cu.import("resource://services-sync/constants.js");
|
|||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-sync/browserid_identity.js");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
|
||||
this.Status = {
|
||||
_log: Log.repository.getLogger("Sync.Status"),
|
||||
|
|
|
@ -15,16 +15,14 @@ Cu.import("resource://services-sync/util.js");
|
|||
Cu.import("resource://services-common/observers.js");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://gre/modules/TelemetryController.jsm");
|
||||
Cu.import("resource://gre/modules/FxAccounts.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm", this);
|
||||
|
||||
let constants = {};
|
||||
Cu.import("resource://services-sync/constants.js", constants);
|
||||
|
||||
var fxAccountsCommon = {};
|
||||
Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryController",
|
||||
"resource://gre/modules/TelemetryController.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
|
||||
"@mozilla.org/base/telemetry;1",
|
||||
|
|
|
@ -6,7 +6,6 @@ this.EXPORTED_SYMBOLS = ["XPCOMUtils", "Services", "Utils", "Async", "Svc", "Str
|
|||
|
||||
var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://services-common/observers.js");
|
||||
Cu.import("resource://services-common/utils.js");
|
||||
Cu.import("resource://services-common/async.js", this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче