From 6a5b7fdb1f1fcfb9627ffd639a55f272c240aa4e Mon Sep 17 00:00:00 2001 From: Florian Queze Date: Wed, 19 Apr 2017 13:37:09 +0200 Subject: [PATCH] Bug 1349742 - avoid initializing UITour whenever about:home is loaded, r=MattN. --- browser/components/uitour/UITour.jsm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index a492fa46e36b..8095635f9960 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -662,7 +662,12 @@ this.UITour = { } } - this.initForBrowser(browser, window); + // For performance reasons, only call initForBrowser if we did something + // that will require a teardownTourForBrowser call later. + // getConfiguration (called from about:home) doesn't require any future + // uninitialization. + if (action != "getConfiguration") + this.initForBrowser(browser, window); return true; },