Bug 1374686 - Don't import LoginManagerContextMenu.jsm during startup. r=florian

MozReview-Commit-ID: KgCnds50n8j

--HG--
extra : rebase_source : b14325f800e11d3c7d713658dec07f4315e6dd19
This commit is contained in:
Matthew Noorenberghe 2017-06-20 14:33:39 -07:00
Родитель 209176cd4a
Коммит 139395de0a
2 изменённых файлов: 10 добавлений и 3 удалений

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

@ -6,7 +6,6 @@
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
Components.utils.import("resource://gre/modules/LoginManagerContextMenu.jsm");
Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
@ -14,6 +13,8 @@ Components.utils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
"resource://gre/modules/LoginHelper.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContextMenu",
"resource://gre/modules/LoginManagerContextMenu.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "WebNavigationFrames",
"resource://gre/modules/WebNavigationFrames.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
@ -146,7 +147,9 @@ nsContextMenu.prototype = {
InlineSpellCheckerUI.clearSuggestionsFromMenu();
InlineSpellCheckerUI.clearDictionaryListFromMenu();
InlineSpellCheckerUI.uninit();
LoginManagerContextMenu.clearLoginsFromMenu(document);
if (Cu.isModuleLoaded("resource://gre/modules/LoginManagerContextMenu.jsm")) {
LoginManagerContextMenu.clearLoginsFromMenu(document);
}
// This handler self-deletes, only run it if it is still there:
if (this._onPopupHiding) {

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

@ -90,7 +90,11 @@ const startupPhases = {
// We are at this phase once we are ready to handle user events.
// Anything loaded at this phase or before gets in the way of the user
// interacting with the first browser window.
"before handling user events": {},
"before handling user events": {blacklist: {
modules: new Set([
"resource://gre/modules/LoginManagerContextMenu.jsm",
]),
}},
};
function test() {