From cd1adf1b4a317c1f712c4da032b0489717db6cb5 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Mon, 5 Sep 2005 22:30:08 +0000 Subject: [PATCH] Bug 235204, remove pref observer to avoid a crash (bug 306135), r=mano --- browser/base/content/search.xml | 22 ---------------------- browser/base/content/searchDialog.css | 6 +++--- browser/base/content/searchDialog.js | 2 +- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/browser/base/content/search.xml b/browser/base/content/search.xml index fa68473aa7c0..edae7ce891c9 100644 --- a/browser/base/content/search.xml +++ b/browser/base/content/search.xml @@ -113,7 +113,6 @@ // there may not be anything to remove here try { this.controllers.removeController(this.searchbarController); - this.mPrefObserver.unregister(); } catch (ex) { } ]]> @@ -140,7 +139,6 @@ .getService(Components.interfaces.nsIPrefBranch2); this._initializeEngine(); - this.mPrefObserver.register(); var element; element = document.createElementNS(XUL_NS, "menuseparator"); @@ -184,25 +182,6 @@ - @@ -264,7 +243,6 @@ // because the searchbar isn't currently destroyed when // removed from the toolbar if (!this.parentNode) { - this.mPrefObserver.unregister(); return false; } diff --git a/browser/base/content/searchDialog.css b/browser/base/content/searchDialog.css index f7edebb9dd80..52f6ce69ddaa 100644 --- a/browser/base/content/searchDialog.css +++ b/browser/base/content/searchDialog.css @@ -1,5 +1,5 @@ /* ***** BEGIN LICENSE BLOCK ***** -#if 0 +%if 0 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version @@ -33,10 +33,10 @@ * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * -#endif +%endif * ***** END LICENSE BLOCK ***** */ - #searchEngineList { +#searchEngineList { min-height: 24px; } diff --git a/browser/base/content/searchDialog.js b/browser/base/content/searchDialog.js index d55fe746f6b5..71672bf3f3bc 100644 --- a/browser/base/content/searchDialog.js +++ b/browser/base/content/searchDialog.js @@ -41,7 +41,7 @@ var gDialog = {}; var gSelectedEngineIndex; const kTabPref = "browser.tabs.opentabfor.searchdialog"; -const kEnginePref = "browser.search.selectedEngine"; +const kEnginePref = "browser.search.selectedEngineInDialog"; const kDefEnginePref = "browser.search.defaultenginename"; const nsIPLS = Components.interfaces.nsIPrefLocalizedString; const kXUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";