mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1332610 - Don't eagerly create Intl.DateTimeFormat in LoginManagerContextMenu.jsm. r=johannh
MozReview-Commit-ID: IuXdWyy4C7b --HG-- extra : rebase_source : cfe475768cd6c1cc051c5ba7981b82d428278eb3
This commit is contained in:
parent
0d9917ce74
commit
cf0a1e0be3
@ -19,8 +19,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerParent",
|
||||
* Password manager object for the browser contextual menu.
|
||||
*/
|
||||
var LoginManagerContextMenu = {
|
||||
dateAndTimeFormatter: new Intl.DateTimeFormat(undefined,
|
||||
{ day: "numeric", month: "short", year: "numeric" }),
|
||||
/**
|
||||
* Look for login items and add them to the contextual menu.
|
||||
*
|
||||
@ -35,7 +33,6 @@ var LoginManagerContextMenu = {
|
||||
* @returns {DocumentFragment} a document fragment with all the login items.
|
||||
*/
|
||||
addLoginsToMenu(inputElement, browser, documentURI) {
|
||||
|
||||
let foundLogins = this._findLogins(documentURI);
|
||||
|
||||
if (!foundLogins.length) {
|
||||
@ -192,3 +189,11 @@ XPCOMUtils.defineLazyGetter(LoginManagerContextMenu, "_stringBundle", function()
|
||||
return Services.strings.
|
||||
createBundle("chrome://passwordmgr/locale/passwordmgr.properties");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(LoginManagerContextMenu, "dateAndTimeFormatter", function() {
|
||||
return new Intl.DateTimeFormat(undefined, {
|
||||
day: "numeric",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user