Bug 235204, remove pref observer to avoid a crash (bug 306135), r=mano
git-svn-id: svn://10.0.0.236/trunk@190455 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -113,7 +113,6 @@
|
||||
// there may not be anything to remove here
|
||||
try {
|
||||
this.controllers.removeController(this.searchbarController);
|
||||
this.mPrefObserver.unregister();
|
||||
} catch (ex) { }
|
||||
]]></destructor>
|
||||
|
||||
@@ -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 @@
|
||||
<field name="rdfService"/>
|
||||
<field name="internetSearchDS"/>
|
||||
<field name="formHistSvc"/>
|
||||
<field name="mPrefObserver" readonly="true"><![CDATA[
|
||||
({
|
||||
|
||||
mOuter: this,
|
||||
|
||||
register: function() {
|
||||
this.mOuter.prefService.addObserver("browser.search.selectedEngine", this, false);
|
||||
},
|
||||
|
||||
unregister: function() {
|
||||
this.mOuter.prefService.removeObserver("browser.search.selectedEngine", this);
|
||||
},
|
||||
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "nsPref:changed")
|
||||
this.mOuter._initializeEngine();
|
||||
}
|
||||
});
|
||||
]]></field>
|
||||
|
||||
<method name="openSearch">
|
||||
<body>
|
||||
@@ -264,7 +243,6 @@
|
||||
// because the searchbar isn't currently destroyed when
|
||||
// removed from the toolbar
|
||||
if (!this.parentNode) {
|
||||
this.mPrefObserver.unregister();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user