From 48621babf9092ed7a6b89a4f564ab9f42f3a5c5a Mon Sep 17 00:00:00 2001 From: "jminta@gmail.com" Date: Tue, 21 Aug 2007 22:01:23 -0700 Subject: [PATCH] Bug 287677 dropping unknown scheme on a tab produces 2 errors, rather than 1, r=mconnor --- browser/base/content/tabbrowser.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 4ed57ef2fc4..10f157d47b0 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1652,10 +1652,13 @@ else { // Load in an existing tab. var tab = aEvent.target; - this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); - - if (this.mCurrentTab != tab && !bgLoad) - this.selectedTab = tab; + try { + this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); + if (this.mCurrentTab != tab && !bgLoad) + this.selectedTab = tab; + } catch(ex) { + // Just ignore invalid urls + } } } ]]>