Bug 1520643 - convert some more 'const' imports to 'var'. r=darktrojan
This commit is contained in:
Родитель
ad3c5d0ad5
Коммит
eb4fcd45e5
|
@ -1,10 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var {EmptyEnumerator, XPCOMUtils, ClassInfo} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
|
||||
ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
|
||||
var {GenericAccountPrototype, GenericAccountBuddyPrototype} = ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
|
||||
|
||||
var kPrefAutologinPending = "messenger.accounts.autoLoginPending";
|
||||
var kPrefMessengerAccounts = "messenger.accounts";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var {XPCOMUtils, ClassInfo, initLogModule} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "categoryManager",
|
||||
"@mozilla.org/categorymanager;1",
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
|
||||
var CC = Components.Constructor;
|
||||
|
||||
ChromeUtils.import("resource:///modules/hiddenWindow.jsm");
|
||||
var {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
|
||||
const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
const {GenericMessagePrototype} = ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
|
||||
const {ClassInfo} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
const {ToLocaleFormat} = ChromeUtils.import("resource:///modules/ToLocaleFormat.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
|
||||
var {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var {GenericMessagePrototype} = ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
|
||||
var {ClassInfo} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var {ToLocaleFormat} = ChromeUtils.import("resource:///modules/ToLocaleFormat.jsm");
|
||||
var {OS} = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/logger.properties")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
function updateDocumentSourceMaps(src) {
|
||||
const nsISAXXMLReader = Ci.nsISAXXMLReader;
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["ExtensionSupport"];
|
||||
|
||||
const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
// ChromeUtils.import("resource://gre/modules/Deprecated.jsm") - needed for warning.
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
|
||||
const {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
|
||||
var {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
|
||||
|
||||
var extensionHooks = new Map();
|
||||
var legacyExtensions = new Map();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
extends="chrome://mozapps/content/extensions/extensions.xml#addon-generic">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
const {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
var {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
this._updateState = this._updateState.bind(this);
|
||||
ExtensionParent.apiManager.on("startup", this._updateState);
|
||||
ExtensionParent.apiManager.on("shutdown", this._updateState);
|
||||
|
|
|
@ -24,7 +24,7 @@ var {
|
|||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
var {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
var {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
|
||||
const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
if (typeof FeedMessageHandler != "object")
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
/* import-globals-from utilityOverlay.js */
|
||||
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var { GlodaSyntheticView } = ChromeUtils.import("resource:///modules/gloda/dbview.js");
|
||||
var {GlodaSyntheticView} = ChromeUtils.import("resource:///modules/gloda/dbview.js");
|
||||
var {MailConsts} = ChromeUtils.import("resource:///modules/MailConsts.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
|
@ -25,10 +25,10 @@ var {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
|||
var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
var {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionParent", "resource://gre/modules/ExtensionParent.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionSupport", "resource:///modules/ExtensionSupport.jsm");
|
||||
var {BrowserToolboxProcess} = ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm");
|
||||
var {ScratchpadManager} = ChromeUtils.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm");
|
||||
var {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
var {ExtensionSupport} = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
|
||||
Object.defineProperty(this, "HUDService", {
|
||||
get() {
|
||||
let { devtools } = ChromeUtils.import("resource://devtools/shared/Loader.jsm");
|
||||
|
|
|
@ -11,8 +11,8 @@ var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||
var {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
var {StringBundle} = ChromeUtils.import("resource:///modules/StringBundle.js");
|
||||
var {BrowserUtils} = ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
const {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
|
||||
function tabProgressListener(aTab, aStartsBlank) {
|
||||
this.mTab = aTab;
|
||||
|
|
|
@ -10,8 +10,8 @@ const BRAND_PROPERTIES = "chrome://branding/locale/brand.properties";
|
|||
const DEFAULT_EXTENSION_ICON = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
const {BrowserUtils} = ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var {BrowserUtils} = ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm",
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["ToolbarButtonAPI"];
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ViewPopup", "resource:///modules/ExtensionPopups.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionSupport", "resource:///modules/ExtensionSupport.jsm");
|
||||
const {ExtensionCommon} = ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
|
||||
const {ExtensionUtils} = ChromeUtils.import("resource://gre/modules/ExtensionUtils.jsm");
|
||||
const {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {ViewPopup} = ChromeUtils.import("resource:///modules/ExtensionPopups.jsm");
|
||||
var {ExtensionSupport} = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
|
||||
var {ExtensionCommon} = ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
|
||||
var {ExtensionUtils} = ChromeUtils.import("resource://gre/modules/ExtensionUtils.jsm");
|
||||
var {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
|
||||
const {
|
||||
EventManager,
|
||||
|
@ -27,7 +27,7 @@ const {
|
|||
ExtensionError,
|
||||
} = ExtensionUtils;
|
||||
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyGlobalGetters(this, ["InspectorUtils"]);
|
||||
|
||||
var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionParent", "resource://gre/modules/ExtensionParent.jsm");
|
||||
var {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
|
||||
|
||||
var gPrefTab = null;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
load("resources/glodaTestHelper.js");
|
||||
|
||||
var {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// Whether we can expect fulltext results
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
this.EXPORTED_SYMBOLS = ["Feed", "FeedItem", "FeedParser", "FeedUtils"];
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Log4Moz} = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
|
||||
const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
const {jsmime} = ChromeUtils.import("resource:///modules/jsmime.jsm");
|
||||
const {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var {Log4Moz} = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
|
||||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
var {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
var {jsmime} = ChromeUtils.import("resource:///modules/jsmime.jsm");
|
||||
var {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
Services.scriptloader.loadSubScript("chrome://messenger-newsblog/content/Feed.js");
|
||||
Services.scriptloader.loadSubScript("chrome://messenger-newsblog/content/FeedItem.js");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
|
||||
var gAccount, gUpdateEnabled, gUpdateValue, gBiffUnits,
|
||||
gAutotagEnable, gAutotagUsePrefix, gAutotagPrefix;
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
* 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/. */
|
||||
|
||||
const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
ChromeUtils.import("resource:///modules/gloda/log4moz.js");
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
const {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
||||
var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
var {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
|
||||
/* Feed account standalone wizard functions */
|
||||
var FeedAccountWizard = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
function FeedDownloader() { }
|
||||
|
|
|
@ -11,9 +11,9 @@ this.EXPORTED_SYMBOLS = ['NetworkTestUtils'];
|
|||
|
||||
var CC = Components.Constructor;
|
||||
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var {Promise} = ChromeUtils.import("resource://gre/modules/Promise.jsm");
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* }
|
||||
*/
|
||||
|
||||
const {logException} = ChromeUtils.import("resource:///modules/errUtils.js");
|
||||
var {logException} = ChromeUtils.import("resource:///modules/errUtils.js");
|
||||
|
||||
/**
|
||||
* Url listener that can wrap another listener and trigger a callback, but
|
||||
|
|
Загрузка…
Ссылка в новой задаче