mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Backed out changeset 4d2cefab5e0f (bug 960864) CLOSED TREE
This commit is contained in:
parent
765d86ae0c
commit
9d4b153953
@ -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;
|
||||
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
os.removeObserver(this, "browser-search-engine-modified");
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user