From ec97a6079e2445dd44ec95ca09bf9f6ad3403a50 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Thu, 4 Nov 2010 21:36:47 -0400 Subject: [PATCH] Bug 609813 - Avoid Browser.computeSidebarVisibility in NewTabPopup 'TabOpen' handler [r=mbrubeck] --- mobile/chrome/content/browser-ui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 548757965904..fb1b536b4f34 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -1469,8 +1469,12 @@ var NewTabPopup = { }, handleEvent: function nt_handleEvent(aEvent) { + // Bail early and fast + if (!aEvent.detail) + return; + let [tabsVisibility,,,] = Browser.computeSidebarVisibility(); - if (tabsVisibility != 1.0 && aEvent.detail) + if (tabsVisibility != 1.0) this.show(aEvent.originalTarget); } };