Bug 1508585 - Load search-one-offs.js lazily. r=bgrins
authorDão Gottwald <dao@mozilla.com>
Tue, 20 Nov 2018 17:04:43 +0000
changeset 503690 29f9fb8fd7ee6a8ff4758210fb5c18c1083f9322
parent 503689 bd64f10454cc0693bb9932d6203765d005cbd970
child 503691 117bb70216d301a004d6c565fc64fb7b6e138e65
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1508585
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508585 - Load search-one-offs.js lazily. r=bgrins Differential Revision: https://phabricator.services.mozilla.com/D12405
browser/base/content/browser.js
browser/base/content/browser.xul
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -130,16 +130,18 @@ XPCOMUtils.defineLazyScriptGetter(this, 
                                          "DownloadsSummary", "DownloadsFooter",
                                          "DownloadsBlockedSubview"],
                                   "chrome://browser/content/downloads/downloads.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["DownloadsButton",
                                          "DownloadsIndicatorView"],
                                   "chrome://browser/content/downloads/indicator.js");
 XPCOMUtils.defineLazyScriptGetter(this, "gEditItemOverlay",
                                   "chrome://browser/content/places/editBookmark.js");
+XPCOMUtils.defineLazyScriptGetter(this, "SearchOneOffs",
+                                  "chrome://browser/content/search/search-one-offs.js");
 if (AppConstants.NIGHTLY_BUILD) {
   XPCOMUtils.defineLazyScriptGetter(this, "gWebRender",
                                     "chrome://browser/content/browser-webrender.js");
 }
 
 // lazy service getters
 
 XPCOMUtils.defineLazyServiceGetters(this, {
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -84,17 +84,16 @@
 
 <script type="application/javascript"
 #ifdef BROWSER_XHTML
 xmlns="http://www.w3.org/1999/xhtml"
 #endif
 >
   Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
   Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
-  Services.scriptloader.loadSubScript("chrome://browser/content/search/search-one-offs.js", this);
 
   window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
   window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
   window.onclose = WindowIsClosing;
 
 #ifdef BROWSER_XHTML
   window.addEventListener("readystatechange", () => {
     // We initially hide the window to prevent layouts during parse. This lets us