Bug 1872942 - Replace XPCOMUtils.defineLazyGetter with ChromeUtils.defineLazyGetter in comm-central. r=aleca
``` grep -rEl "XPCOMUtils.defineLazyGetter\(" --exclude-dir=.hg --exclude-dir=suite --exclude-dir=rust --include="*.js" --include="*.jsm" --include="*.mjs" --exclude=".*" . | xargs xargs sed -i -E 's/XPCOMUtils.defineLazyGetter\(/ChromeUtils.defineLazyGetter(/g' ``` + linting and fixing that up. Differential Revision: https://phabricator.services.mozilla.com/D197706 --HG-- extra : rebase_source : fb2048af7f476cfc48dd36dd6a8293ae1fa56446 extra : amend_source : 0296fe25ba954f764f6e8dde8b81d0e0874cdd05
This commit is contained in:
Родитель
f7f98443a5
Коммит
9bc4e38b29
|
@ -15,7 +15,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
CalTodo: "resource:///modules/CalTodo.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "extractService", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "extractService", () => {
|
||||
const { CalExtractParserService } = ChromeUtils.import(
|
||||
"resource:///modules/calendar/extract/CalExtractParserService.jsm"
|
||||
);
|
||||
|
|
|
@ -144,13 +144,13 @@ var calendarTabType = {
|
|||
saveTabState(tab) {},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(calendarTabType.modes.calendar, "notificationbox", () => {
|
||||
ChromeUtils.defineLazyGetter(calendarTabType.modes.calendar, "notificationbox", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
document.getElementById("calendar-deactivated-notification-location-events").append(element);
|
||||
});
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(calendarTabType.modes.tasks, "notificationbox", () => {
|
||||
ChromeUtils.defineLazyGetter(calendarTabType.modes.tasks, "notificationbox", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
document.getElementById("calendar-deactivated-notification-location-tasks").append(element);
|
||||
});
|
||||
|
|
|
@ -49,7 +49,7 @@ addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gReadOnlyNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gReadOnlyNotification", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
element.setAttribute("notificationside", "top");
|
||||
document.getElementById("readonly-notification").append(element);
|
||||
|
|
|
@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
var allowedActionsMap = {};
|
||||
var suppressListUpdate = false;
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gReminderNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gReminderNotification", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
document.getElementById("reminder-notifications").append(element);
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ var { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm"
|
|||
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gIdentityNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gIdentityNotification", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
document.getElementById("no-identity-notification").append(element);
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
SelectionUtils: "resource://gre/modules/SelectionUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gStatusNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gStatusNotification", () => {
|
||||
return new MozElements.NotificationBox(async element => {
|
||||
const box = document.getElementById("status-notifications");
|
||||
// Fix window size after the notification animation is done.
|
||||
|
|
|
@ -79,7 +79,7 @@ var gConfig = {
|
|||
// parent context, so that they are already set before iframe content load:
|
||||
// - gTimezoneEnabled
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gEventNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gEventNotification", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
document.getElementById("event-dialog-notifications").append(element);
|
||||
});
|
||||
|
|
|
@ -659,7 +659,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
AgendaListItem,
|
||||
"relativeFormatter",
|
||||
() => new Intl.RelativeTimeFormat(undefined, { numeric: "auto", style: "short" })
|
||||
|
|
|
@ -10,7 +10,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
cal: "resource:///modules/calendar/calUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gDateStringBundle", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "gDateStringBundle", () =>
|
||||
Services.strings.createBundle("chrome://calendar/locale/dateFormat.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -883,7 +883,7 @@ export var provider = {
|
|||
};
|
||||
|
||||
// Initialize `cal.provider.providers` with the built-in providers.
|
||||
XPCOMUtils.defineLazyGetter(provider, "providers", () => {
|
||||
ChromeUtils.defineLazyGetter(provider, "providers", () => {
|
||||
const { CalICSProvider } = ChromeUtils.import("resource:///modules/CalICSProvider.jsm");
|
||||
const { CalDavProvider } = ChromeUtils.import("resource:///modules/CalDavProvider.jsm");
|
||||
return new Map([
|
||||
|
@ -893,7 +893,7 @@ XPCOMUtils.defineLazyGetter(provider, "providers", () => {
|
|||
});
|
||||
|
||||
// This is the transport returned by getImipTransport().
|
||||
XPCOMUtils.defineLazyGetter(provider, "defaultImipTransport", () => {
|
||||
ChromeUtils.defineLazyGetter(provider, "defaultImipTransport", () => {
|
||||
const { CalItipEmailTransport } = ChromeUtils.import(
|
||||
"resource:///modules/CalItipEmailTransport.jsm"
|
||||
);
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
// NOTE: This module should not be loaded directly, it is available when
|
||||
// including calUtils.jsm under the cal.window namespace.
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10nDeletePrompt",
|
||||
() => new Localization(["calendar/calendar-delete-prompt.ftl"], true)
|
||||
|
|
|
@ -6,11 +6,10 @@ var EXPORTED_SYMBOLS = ["CalTimezone"];
|
|||
|
||||
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
|
||||
var { ICAL } = ChromeUtils.import("resource:///modules/calendar/Ical.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10nBundle", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10nBundle", () => {
|
||||
// Prepare localized timezone display values
|
||||
const bundleURL = "chrome://calendar/locale/timezones.properties";
|
||||
return Services.strings.createBundle(bundleURL);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
|
||||
var { OAuth2 } = ChromeUtils.import("resource:///modules/OAuth2.jsm");
|
||||
var { setTimeout } = ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
@ -367,17 +366,17 @@ class CalDavSession {
|
|||
this.name = aName;
|
||||
|
||||
// Only create an auth adapter if we're going to use it.
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
this.authAdapters,
|
||||
"apidata.googleusercontent.com",
|
||||
() => new CalDavGoogleOAuth(aSessionId, aName)
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
this.authAdapters,
|
||||
"caldav.fastmail.com",
|
||||
() => new CalDavFastmailOAuth(aSessionId, aName)
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
this.authAdapters,
|
||||
"mochi.test",
|
||||
() => new CalDavTestOAuth(aSessionId, aName)
|
||||
|
|
|
@ -20,10 +20,10 @@ import {
|
|||
} from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/accounts.properties")
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_maxDebugMessages", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_maxDebugMessages", () =>
|
||||
Services.prefs.getIntPref("messenger.accounts.maxDebugMessages")
|
||||
);
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/commands.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import {
|
||||
executeSoon,
|
||||
ClassInfo,
|
||||
|
@ -12,7 +11,7 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/contacts.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { Status } from "resource:///modules/imStatusUtils.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { ClassInfo } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { Message } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
|
@ -12,7 +11,7 @@ var gLastPrplConvId = 0;
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "bundle", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "bundle", () =>
|
||||
Services.strings.createBundle("chrome://chat/locale/conversations.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ToLocaleFormat: "resource:///modules/ToLocaleFormat.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/logger.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -7,11 +7,10 @@ import { ctypes } from "resource://gre/modules/ctypes.sys.mjs";
|
|||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { CLib } from "resource:///modules/CLib.sys.mjs";
|
||||
import { OTRLibLoader } from "resource:///modules/OTRLib.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/otr/otr.ftl"], true)
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { OTR } from "resource:///modules/OTR.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/otr/otrUI.ftl"], true)
|
||||
|
|
|
@ -8,10 +8,8 @@
|
|||
* http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html
|
||||
*/
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"dateTimeFormatter",
|
||||
() =>
|
||||
|
@ -20,7 +18,7 @@ XPCOMUtils.defineLazyGetter(
|
|||
timeStyle: "long",
|
||||
})
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"dateFormatter",
|
||||
() =>
|
||||
|
@ -28,7 +26,7 @@ XPCOMUtils.defineLazyGetter(
|
|||
dateStyle: "full",
|
||||
})
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"timeFormatter",
|
||||
() =>
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
/** Used to add smileys to the content of a textnode. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gTextDecoder", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "gTextDecoder", () => {
|
||||
return new TextDecoder();
|
||||
});
|
||||
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/status.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
const ParserUtils = Cc["@mozilla.org/parserutils;1"].getService(
|
||||
|
@ -21,18 +19,18 @@ var DEFAULT_THEMES = ["bubbles", "dark", "mail", "papersheets", "simple"];
|
|||
|
||||
var kLineBreak = "@mozilla.org/windows-registry-key;1" in Cc ? "\r\n" : "\n";
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gPrefBranch", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "gPrefBranch", () =>
|
||||
Services.prefs.getBranch(kMessagesStylePrefBranch)
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
const cs = Cc["@mozilla.org/txttohtmlconv;1"].getService(
|
||||
Ci.mozITXTToHTMLConv
|
||||
);
|
||||
return aTXT => cs.scanTXT(aTXT, cs.kEntities);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gTimeFormatter", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "gTimeFormatter", () => {
|
||||
return new Services.intl.DateTimeFormat(undefined, {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
var kLogLevelPref = "purple.debug.loglevel";
|
||||
|
||||
/**
|
||||
|
@ -98,7 +96,7 @@ export function initLogModule(aModule, aObj = {}) {
|
|||
}
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gLogLevels", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "gLogLevels", function () {
|
||||
// This object functions both as an obsever as well as a dict keeping the
|
||||
// log levels with prefs; the log levels all start with "level" (i.e. "level"
|
||||
// for the global level, "level.irc" for the IRC module). The dual-purpose
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import {
|
||||
initLogModule,
|
||||
nsSimpleEnumerator,
|
||||
|
@ -13,11 +12,11 @@ import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/conversations.properties")
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
const cs = Cc["@mozilla.org/txttohtmlconv;1"].getService(
|
||||
Ci.mozITXTToHTMLConv
|
||||
);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -11,7 +10,7 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/facebook.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -11,7 +10,7 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import {
|
||||
ClassInfo,
|
||||
executeSoon,
|
||||
|
@ -35,10 +34,10 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ircHandlers: "resource:///modules/ircHandlers.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_conv", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_conv", () =>
|
||||
l10nHelper("chrome://chat/locale/conversations.properties")
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* RFC 1459: Internet Relay Chat Protocol
|
||||
* http://tools.ietf.org/html/rfc1459
|
||||
*/
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import {
|
||||
l10nHelper,
|
||||
nsSimpleEnumerator,
|
||||
|
@ -32,7 +31,7 @@ import {
|
|||
} from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
* REVISED AND UPDATED CTCP SPECIFICATION
|
||||
* http://www.alien.net.au/irc/ctcp.txt
|
||||
*/
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { ircHandlerPriorities } from "resource:///modules/ircHandlerPriorities.sys.mjs";
|
||||
import { displayMessage } from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
// This is to be exported directly onto the IRC prplIProtocol object, directly
|
||||
// implementing the commands field before we register them.
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
* https://github.com/atheme/charybdis/blob/master/include/numeric.h
|
||||
* https://github.com/unrealircd/unrealircd/blob/unreal42/include/numeric.h
|
||||
*/
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { ircHandlerPriorities } from "resource:///modules/ircHandlerPriorities.sys.mjs";
|
||||
import {
|
||||
|
@ -21,7 +20,7 @@ import {
|
|||
} from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
const cs = Cc["@mozilla.org/txttohtmlconv;1"].getService(
|
||||
Ci.mozITXTToHTMLConv
|
||||
);
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "brandShortName", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "brandShortName", () =>
|
||||
Services.strings
|
||||
.createBundle("chrome://branding/locale/brand.properties")
|
||||
.GetStringFromName("brandShortName")
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import {
|
||||
nsSimpleEnumerator,
|
||||
l10nHelper,
|
||||
|
@ -23,11 +22,11 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix.ftl"], true)
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
|
@ -17,7 +16,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
MatrixSDK: "resource:///modules/matrix-sdk.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "EVENT_TO_STRING", () => ({
|
||||
ChromeUtils.defineLazyGetter(lazy, "EVENT_TO_STRING", () => ({
|
||||
ban: "powerLevel.ban",
|
||||
[lazy.MatrixSDK.EventType.RoomAvatar]: "powerLevel.roomAvatar",
|
||||
[lazy.MatrixSDK.EventType.RoomCanonicalAlias]: "powerLevel.mainAddress",
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { MatrixSDK } from "resource:///modules/matrix-sdk.sys.mjs";
|
||||
|
||||
|
@ -10,14 +9,14 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
getMatrixTextForEvent: "resource:///modules/matrixTextForEvent.sys.mjs",
|
||||
});
|
||||
XPCOMUtils.defineLazyGetter(lazy, "domParser", () => new DOMParser());
|
||||
XPCOMUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "domParser", () => new DOMParser());
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
const cs = Cc["@mozilla.org/txttohtmlconv;1"].getService(
|
||||
Ci.mozITXTToHTMLConv
|
||||
);
|
||||
return aTxt => cs.scanTXT(aTxt, cs.kEntities);
|
||||
});
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { MatrixSDK } from "resource:///modules/matrix-sdk.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -16,7 +15,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
XMPPSession: "resource:///modules/xmpp-session.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "OdnoklassnikiAccount", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "OdnoklassnikiAccount", () => {
|
||||
function OdnoklassnikiAccount(aProtoInstance, aImAccount) {
|
||||
this._init(aProtoInstance, aImAccount);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -11,7 +10,7 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/twitter.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -42,11 +42,11 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"imgITools"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
const cs = Cc["@mozilla.org/txttohtmlconv;1"].getService(
|
||||
Ci.mozITXTToHTMLConv
|
||||
);
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { DNS } from "resource:///modules/DNS.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { Socket } from "resource:///modules/socket.sys.mjs";
|
||||
import { Stanza, XMPPParser } from "resource:///modules/xmpp-xml.sys.mjs";
|
||||
|
@ -11,7 +10,7 @@ import { XMPPAuthMechanisms } from "resource:///modules/xmpp-authmechs.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -2,20 +2,19 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
XMPPAccountPrototype: "resource:///modules/xmpp-base.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "XMPPAccount", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "XMPPAccount", () => {
|
||||
function XMPPAccount(aProtoInstance, aImAccount) {
|
||||
this._init(aProtoInstance, aImAccount);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -11,7 +10,7 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/yahoo.properties")
|
||||
);
|
||||
|
||||
|
|
|
@ -4041,7 +4041,7 @@ var threadPane = {
|
|||
});
|
||||
this.updateThreadItemSize();
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "notificationBox", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "notificationBox", () => {
|
||||
const container = document.getElementById("threadPaneNotificationBox");
|
||||
return new MozElements.NotificationBox(element =>
|
||||
container.append(element)
|
||||
|
|
|
@ -26,7 +26,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gViewSourceUtils", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "gViewSourceUtils", function () {
|
||||
const scope = {};
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://global/content/viewSourceUtils.js",
|
||||
|
|
|
@ -44,7 +44,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
SessionStoreManager: "resource:///modules/SessionStoreManager.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "PopupNotifications", function () {
|
||||
const { PopupNotifications } = ChromeUtils.import(
|
||||
"resource:///modules/GlobalPopupNotifications.jsm"
|
||||
);
|
||||
|
|
|
@ -28,7 +28,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
var gMessenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
|
||||
|
||||
// Set up our string formatter for localizing strings.
|
||||
XPCOMUtils.defineLazyGetter(this, "formatString", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "formatString", function () {
|
||||
const formatter = new PluralStringFormatter(
|
||||
"chrome://messenger/locale/multimessageview.properties"
|
||||
);
|
||||
|
|
|
@ -15,7 +15,7 @@ var { MailE10SUtils } = ChromeUtils.import(
|
|||
);
|
||||
|
||||
// Load PrintUtils lazily and modify it to suit.
|
||||
XPCOMUtils.defineLazyGetter(this, "PrintUtils", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "PrintUtils", () => {
|
||||
const scope = {};
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://global/content/printUtils.js",
|
||||
|
|
|
@ -604,6 +604,6 @@ var quickFilterBar = {
|
|||
this.reflectFiltererState();
|
||||
},
|
||||
};
|
||||
XPCOMUtils.defineLazyGetter(quickFilterBar, "domNode", () =>
|
||||
ChromeUtils.defineLazyGetter(quickFilterBar, "domNode", () =>
|
||||
document.getElementById("quick-filter-bar")
|
||||
);
|
||||
|
|
|
@ -17,10 +17,6 @@ customElements.whenDefined("autocomplete-input").then(() => {
|
|||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GlodaIMSearcher: "resource:///modules/GlodaIMSearcher.sys.mjs",
|
||||
|
@ -41,7 +37,7 @@ customElements.whenDefined("autocomplete-input").then(() => {
|
|||
"resource:///modules/gloda/GlodaConstants.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"glodaCompleter",
|
||||
() =>
|
||||
|
|
|
@ -19,14 +19,14 @@ const lazy = {};
|
|||
|
||||
// lazy module getter
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gMailBundle", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "gMailBundle", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger/locale/messenger.properties"
|
||||
);
|
||||
});
|
||||
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"WeaveService",
|
||||
() => Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
|
||||
|
|
|
@ -17,7 +17,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "ABQueryUtils", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "ABQueryUtils", function () {
|
||||
return ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
|
||||
});
|
||||
|
||||
|
@ -41,7 +41,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
VCardProperties: "resource:///modules/VCardUtils.jsm",
|
||||
VCardPropertyEntry: "resource:///modules/VCardUtils.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyGetter(this, "SubDialog", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "SubDialog", function () {
|
||||
const { SubDialogManager } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/SubDialog.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -59,7 +59,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
BondOpenPGP: "chrome://openpgp/content/BondOpenPGP.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
this,
|
||||
"l10nCompose",
|
||||
() =>
|
||||
|
@ -69,7 +69,7 @@ XPCOMUtils.defineLazyGetter(
|
|||
])
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
this,
|
||||
"l10nComposeSync",
|
||||
() =>
|
||||
|
@ -445,7 +445,7 @@ function ReleaseGlobalVariables() {
|
|||
}
|
||||
|
||||
// Notification box shown at the bottom of the window.
|
||||
XPCOMUtils.defineLazyGetter(this, "gComposeNotification", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gComposeNotification", () => {
|
||||
return new MozElements.NotificationBox(element => {
|
||||
element.setAttribute("notificationside", "bottom");
|
||||
document.getElementById("compose-notification-bottom").append(element);
|
||||
|
|
|
@ -97,11 +97,9 @@
|
|||
* └───┴───┴── Open views
|
||||
*/
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gBundle", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "gBundle", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger/locale/messenger.properties"
|
||||
);
|
||||
|
|
|
@ -32,7 +32,7 @@ const ABOUT_CONTRACT = "@mozilla.org/network/protocol/about;1?what=";
|
|||
|
||||
const isXpcshell = Services.env.exists("XPCSHELL_TEST_PROFILE_DIR");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "log", () => {
|
||||
const { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
const PREF_LOGLEVEL = "browser.policies.loglevel";
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "log", () => {
|
||||
const { ConsoleAPI } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Console.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "makeRange", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "makeRange", () => {
|
||||
const { ExtensionParent } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ExtensionParent.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
/* This file is a much-modified copy of browser/components/extensions/ExtensionPopups.sys.mjs. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -23,7 +21,7 @@ var { DefaultWeakMap, ExtensionError, promiseEvent } = ExtensionUtils;
|
|||
|
||||
const POPUP_LOAD_TIMEOUT_MS = 200;
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "standaloneStylesheets", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "standaloneStylesheets", () => {
|
||||
const stylesheets = [];
|
||||
|
||||
if (AppConstants.platform === "macosx") {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { ExtensionShortcuts } from "resource://gre/modules/ExtensionShortcuts.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
@ -11,15 +10,15 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ExtensionParent: "resource://gre/modules/ExtensionParent.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "browserActionFor", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "browserActionFor", () => {
|
||||
return lazy.ExtensionParent.apiManager.global.browserActionFor;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "composeActionFor", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "composeActionFor", () => {
|
||||
return lazy.ExtensionParent.apiManager.global.composeActionFor;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "messageDisplayActionFor", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "messageDisplayActionFor", () => {
|
||||
return lazy.ExtensionParent.apiManager.global.messageDisplayActionFor;
|
||||
});
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ global.TabContext = class extends EventEmitter {
|
|||
// None of the code in the WebExtension modules requests that initialization.
|
||||
// It is assumed that it is started at some point. That might never happen,
|
||||
// e.g. if the application shuts down before the search service initializes.
|
||||
XPCOMUtils.defineLazyGetter(global, "searchInitialized", () => {
|
||||
ChromeUtils.defineLazyGetter(global, "searchInitialized", () => {
|
||||
if (Services.search.isInitialized) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
OTRUI: "resource:///modules/OTRUI.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/otr/otrUI.ftl"], true)
|
||||
|
|
|
@ -22,7 +22,6 @@ const { MailServices } = ChromeUtils.import(
|
|||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
import { FileUtils } from "resource://gre/modules/FileUtils.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
|
||||
|
@ -54,7 +53,7 @@ var ScriptableInputStream = CC(
|
|||
// job to actually carrying it out.
|
||||
var kIndexingDelay = 5000; // in milliseconds
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "MailFolder", () =>
|
||||
ChromeUtils.defineLazyGetter(lazy, "MailFolder", () =>
|
||||
Cc["@mozilla.org/mail/folder-factory;1?name=mailbox"].createInstance(
|
||||
Ci.nsIMsgFolder
|
||||
)
|
||||
|
|
|
@ -4,14 +4,11 @@
|
|||
|
||||
const EXPORTED_SYMBOLS = ["ThunderbirdProfileMigrator"];
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/importDialog.ftl"])
|
||||
|
|
|
@ -34,7 +34,7 @@ XPCOMUtils.defineLazyServiceGetters(this, {
|
|||
gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gIsPackagedApp", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "gIsPackagedApp", () => {
|
||||
return Services.sysinfo.getProperty("isPackagedApp");
|
||||
});
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
UIFontSize: "resource:///modules/UIFontSize.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
const { SubDialogManager } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/SubDialog.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["PromptCollection"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
* Implements nsIPromptCollection
|
||||
*
|
||||
|
@ -78,7 +74,7 @@ class PromptCollection {
|
|||
}
|
||||
}
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
PromptCollection.prototype,
|
||||
"domBundle",
|
||||
function () {
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
import { SearchBar } from "chrome://messenger/content/search-bar.mjs";
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -28,7 +24,7 @@ ChromeUtils.defineModuleGetter(
|
|||
"Gloda",
|
||||
"resource:///modules/gloda/GlodaPublic.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"glodaCompleter",
|
||||
() =>
|
||||
|
|
|
@ -29,7 +29,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
MailStringUtils: "resource:///modules/MailStringUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
PgpSqliteDb2: "chrome://openpgp/content/modules/sqliteDb.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
MailStringUtils: "resource:///modules/MailStringUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
EnigmailWkdLookup: "chrome://openpgp/content/modules/wkdLookup.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
EnigmailLog: "chrome://openpgp/content/modules/log.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
RNP: "chrome://openpgp/content/modules/RNP.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"]);
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
MailStringUtils: "resource:///modules/MailStringUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
EnigmailVerify: "chrome://openpgp/content/modules/mimeVerify.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
MailCryptoUtils: "resource:///modules/MailCryptoUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
EnigmailLog: "chrome://openpgp/content/modules/log.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
RNP: "chrome://openpgp/content/modules/RNP.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "l10n", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "l10n", () => {
|
||||
return new Localization(["messenger/openpgp/openpgp.ftl"], true);
|
||||
});
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
|
|||
gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "messengerBundle", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "messengerBundle", () => {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger/locale/messenger.properties"
|
||||
);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { EventEmitter } from "resource://gre/modules/EventEmitter.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
@ -28,7 +27,7 @@ import {
|
|||
// Extension.sys.mjs to resolve our permissions strings.
|
||||
PERMISSION_L10N.addResourceIds(["messenger/extensionPermissions.ftl"]);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() =>
|
||||
|
|
|
@ -14,10 +14,6 @@ const EXPORTED_SYMBOLS = ["ShortcutsManager"];
|
|||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const ShortcutsManager = {
|
||||
/**
|
||||
* Fluent strings mapping to allow updating strings without changing all the
|
||||
|
@ -338,7 +334,7 @@ const ShortcutsManager = {
|
|||
},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
ShortcutsManager,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/shortcuts.ftl"])
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
const EXPORTED_SYMBOLS = ["TBDistCustomizer"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var TBDistCustomizer = {
|
||||
applyPrefDefaults() {
|
||||
this._prefDefaultsApplied = true;
|
||||
|
@ -138,7 +134,7 @@ var TBDistCustomizer = {
|
|||
},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(TBDistCustomizer, "_ini", function () {
|
||||
ChromeUtils.defineLazyGetter(TBDistCustomizer, "_ini", function () {
|
||||
let ini = null;
|
||||
const iniFile = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
iniFile.append("distribution");
|
||||
|
@ -151,7 +147,7 @@ XPCOMUtils.defineLazyGetter(TBDistCustomizer, "_ini", function () {
|
|||
return ini;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(TBDistCustomizer, "_locale", function () {
|
||||
ChromeUtils.defineLazyGetter(TBDistCustomizer, "_locale", function () {
|
||||
return Services.locale.requestedLocale;
|
||||
});
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ var PREF_TASKBAR_TASKS = "tasks.enabled";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_stringBundle", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "_stringBundle", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger/locale/taskbar.properties"
|
||||
);
|
||||
|
@ -29,7 +29,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIWinTaskbar"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_prefs", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "_prefs", function () {
|
||||
return Services.prefs.getBranch(PREF_TASKBAR_BRANCH);
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "brandShortName", () =>
|
||||
ChromeUtils.defineLazyGetter(this, "brandShortName", () =>
|
||||
Services.strings
|
||||
.createBundle("chrome://branding/locale/brand.properties")
|
||||
.GetStringFromName("brandShortName")
|
||||
|
|
|
@ -30,7 +30,7 @@ function AddrBookCard() {
|
|||
]);
|
||||
|
||||
this._hasVCard = false;
|
||||
XPCOMUtils.defineLazyGetter(this, "_vCardProperties", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "_vCardProperties", () => {
|
||||
// Lazy creation of the VCardProperties object. Change the `_properties`
|
||||
// object as much as you like (e.g. loading in properties from a database)
|
||||
// before running this code. After it runs, the `_vCardProperties` object
|
||||
|
|
|
@ -55,7 +55,7 @@ var { ChatIcons } = ChromeUtils.importESModule(
|
|||
"resource:///modules/chatIcons.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
const { SubDialogManager } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/SubDialog.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -21,7 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
WinUnreadBadge: "resource:///modules/WinUnreadBadge.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/messenger.ftl"])
|
||||
|
@ -62,7 +62,7 @@ class MailNotificationManager {
|
|||
|
||||
// Ensure that OS integration is defined before we attempt to initialize the
|
||||
// system tray icon.
|
||||
XPCOMUtils.defineLazyGetter(this, "_osIntegration", () => {
|
||||
ChromeUtils.defineLazyGetter(this, "_osIntegration", () => {
|
||||
try {
|
||||
return Cc["@mozilla.org/messenger/osintegration;1"].getService(
|
||||
Ci.nsIMessengerOSIntegration
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["MsgAsyncPrompter", "MsgAuthPrompt"];
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const LoginInfo = Components.Constructor(
|
||||
"@mozilla.org/login-manager/loginInfo;1",
|
||||
"nsILoginInfo",
|
||||
|
@ -21,13 +17,13 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "dialogsBundle", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "dialogsBundle", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://global/locale/commonDialogs.properties"
|
||||
);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "brandFullName", function () {
|
||||
ChromeUtils.defineLazyGetter(lazy, "brandFullName", function () {
|
||||
return Services.strings
|
||||
.createBundle("chrome://branding/locale/brand.properties")
|
||||
.GetStringFromName("brandFullName");
|
||||
|
|
|
@ -2127,20 +2127,20 @@ var FeedUtils = {
|
|||
},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(FeedUtils, "log", function () {
|
||||
ChromeUtils.defineLazyGetter(FeedUtils, "log", function () {
|
||||
return console.createInstance({
|
||||
prefix: "feeds",
|
||||
maxLogLevelPref: "feeds.loglevel",
|
||||
});
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(FeedUtils, "strings", function () {
|
||||
ChromeUtils.defineLazyGetter(FeedUtils, "strings", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger-newsblog/locale/newsblog.properties"
|
||||
);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(FeedUtils, "stringsPrefs", function () {
|
||||
ChromeUtils.defineLazyGetter(FeedUtils, "stringsPrefs", function () {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://messenger/locale/prefs.properties"
|
||||
);
|
||||
|
|
|
@ -287,7 +287,7 @@ class ImporterController {
|
|||
}
|
||||
}
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
ImporterController,
|
||||
"percentFormatter",
|
||||
() =>
|
||||
|
@ -295,7 +295,7 @@ XPCOMUtils.defineLazyGetter(
|
|||
style: "percent",
|
||||
})
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
ImporterController,
|
||||
"notificationBox",
|
||||
() =>
|
||||
|
|
|
@ -22,7 +22,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
exportAttributes: "resource:///modules/AddrBookUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "d3", () => {
|
||||
ChromeUtils.defineLazyGetter(lazy, "d3", () => {
|
||||
const d3Scope = Cu.Sandbox(null);
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://global/content/third_party/d3/d3.js",
|
||||
|
|
|
@ -4,13 +4,8 @@
|
|||
|
||||
const EXPORTED_SYMBOLS = ["ThunderbirdImport"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["messenger/importDialog.ftl"], true)
|
||||
|
|
Загрузка…
Ссылка в новой задаче