Bug 1381853 - lazy load browser-addons.js into the browser window, r=mconley.

This commit is contained in:
Florian Quèze 2017-07-23 00:17:57 +02:00
Родитель f2657d6151
Коммит 71d8831567
3 изменённых файлов: 9 добавлений и 3 удалений

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

@ -3,6 +3,9 @@
* 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/. */
// This file is loaded into the browser window scope.
/* eslint-env mozilla/browser-window */
// Removes a doorhanger notification if all of the installs it was notifying
// about have ended in some way.
function removeNotificationOnEnd(notification, installs) {
@ -29,7 +32,7 @@ function removeNotificationOnEnd(notification, installs) {
}
}
const gXPInstallObserver = {
var gXPInstallObserver = {
_findChildShell(aDocShell, aSoughtShell) {
if (aDocShell == aSoughtShell)
return aDocShell;
@ -482,7 +485,7 @@ const gXPInstallObserver = {
}
};
const gExtensionsNotifications = {
var gExtensionsNotifications = {
initialized: false,
init() {
this.updateAlerts();

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

@ -112,6 +112,10 @@ XPCOMUtils.defineLazyScriptGetter(this, "PanelUI",
"chrome://browser/content/customizableui/panelUI.js");
XPCOMUtils.defineLazyScriptGetter(this, "gViewSourceUtils",
"chrome://global/content/viewSourceUtils.js");
XPCOMUtils.defineLazyScriptGetter(this, ["LightWeightThemeWebInstaller",
"gExtensionsNotifications",
"gXPInstallObserver"],
"chrome://browser/content/browser-addons.js");
// lazy service getters

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

@ -9,7 +9,6 @@
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-addons.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-captivePortal.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-ctrlTab.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-customization.js"/>