Backed out changeset 4d2cefab5e0f (bug 960864) CLOSED TREE

This commit is contained in:
Gavin Sharp 2014-01-18 19:00:27 -08:00
parent 765d86ae0c
commit 9d4b153953

View File

@ -84,7 +84,7 @@
.getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "browser-search-engine-modified", false);
this._destroyed = false;
this._addedObserver = true;
this.searchService.init((function search_init_cb(aStatus) {
// Bail out if the binding's been destroyed
@ -103,9 +103,12 @@
<destructor><![CDATA[
this._destroyed = true;
if (this._addedObserver) {
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(this, "browser-search-engine-modified");
this._addedObserver = false;
}
// Make sure to break the cycle from _textbox to us. Otherwise we leak
// the world. But make sure it's actually pointing to us.