mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-07 21:43:24 +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);
|
.getService(Components.interfaces.nsIObserverService);
|
||||||
os.addObserver(this, "browser-search-engine-modified", false);
|
os.addObserver(this, "browser-search-engine-modified", false);
|
||||||
|
|
||||||
this._destroyed = false;
|
this._addedObserver = true;
|
||||||
|
|
||||||
this.searchService.init((function search_init_cb(aStatus) {
|
this.searchService.init((function search_init_cb(aStatus) {
|
||||||
// Bail out if the binding's been destroyed
|
// Bail out if the binding's been destroyed
|
||||||
@ -103,9 +103,12 @@
|
|||||||
<destructor><![CDATA[
|
<destructor><![CDATA[
|
||||||
this._destroyed = true;
|
this._destroyed = true;
|
||||||
|
|
||||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
if (this._addedObserver) {
|
||||||
.getService(Components.interfaces.nsIObserverService);
|
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||||
os.removeObserver(this, "browser-search-engine-modified");
|
.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
|
// Make sure to break the cycle from _textbox to us. Otherwise we leak
|
||||||
// the world. But make sure it's actually pointing to us.
|
// the world. But make sure it's actually pointing to us.
|
||||||
|
Loading…
Reference in New Issue
Block a user