From 2d00c754b44500da734f36db610af33762c1187c Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Tue, 3 Jul 2018 14:26:51 -0700 Subject: [PATCH] Bug 1445764 - Remove redundant Places imports from pages that load browser.js;r=standard8 MozReview-Commit-ID: JsPiKMA21Fj --HG-- extra : rebase_source : 3ada5cfcb0218d9c3ca798dd78ce1f6c7f1ec3f8 --- browser/base/content/browser.js | 8 ++++++++ browser/base/content/browser.xul | 14 -------------- browser/base/content/macWindow.inc.xul | 14 -------------- browser/base/content/webext-panels.xul | 15 --------------- 4 files changed, 8 insertions(+), 43 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 25423b0630f4..72dfd3738b71 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -41,6 +41,9 @@ XPCOMUtils.defineLazyModuleGetters(this, { PageThumbs: "resource://gre/modules/PageThumbs.jsm", PanelMultiView: "resource:///modules/PanelMultiView.jsm", PanelView: "resource:///modules/PanelMultiView.jsm", + PlacesUtils: "resource://gre/modules/PlacesUtils.jsm", + PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm", + PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm", PluralForm: "resource://gre/modules/PluralForm.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm", @@ -73,6 +76,11 @@ if (AppConstants.MOZ_CRASHREPORTER) { "resource:///modules/ContentCrashHandlers.jsm"); } +XPCOMUtils.defineLazyScriptGetter(this, "PlacesTreeView", + "chrome://browser/content/places/treeView.js"); +XPCOMUtils.defineLazyScriptGetter(this, ["PlacesInsertionPoint", "PlacesController", + "PlacesControllerDragHelper"], + "chrome://browser/content/places/controller.js"); XPCOMUtils.defineLazyScriptGetter(this, "PrintUtils", "chrome://global/content/printUtils.js"); XPCOMUtils.defineLazyScriptGetter(this, "ZoomManager", diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 02df2dfacf98..045fb340f42f 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -59,20 +59,6 @@ # All sets except for popupsets (commands, keys, stringbundles and broadcasters) diff --git a/browser/base/content/macWindow.inc.xul b/browser/base/content/macWindow.inc.xul index 2bd9c0be24dd..a6e5875c23e2 100644 --- a/browser/base/content/macWindow.inc.xul +++ b/browser/base/content/macWindow.inc.xul @@ -30,20 +30,6 @@ addEventListener("load", function() { gBrowserInit.nonBrowserWindowStartup() }, false); addEventListener("unload", function() { gBrowserInit.nonBrowserWindowShutdown() }, false); - - ChromeUtils.defineModuleGetter(window, - "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); - ChromeUtils.defineModuleGetter(window, - "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm"); - ChromeUtils.defineModuleGetter(window, - "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm"); - - ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView", - "chrome://browser/content/places/treeView.js"); - XPCOMUtils.defineLazyScriptGetter(window, - ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"], - "chrome://browser/content/places/controller.js"); # All sets except for popupsets (commands, keys, stringbundles and broadcasters) diff --git a/browser/base/content/webext-panels.xul b/browser/base/content/webext-panels.xul index 27fc4df6a269..97bcd7c5d914 100644 --- a/browser/base/content/webext-panels.xul +++ b/browser/base/content/webext-panels.xul @@ -24,21 +24,6 @@