mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960864 - Initialize _destroyed as false such that it doesn't stay true when the binding gets destroyed and reconstructed. r=gavin
This commit is contained in:
parent
3cbc153770
commit
32337e9592
@ -84,7 +84,7 @@
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
os.addObserver(this, "browser-search-engine-modified", false);
|
||||
|
||||
this._addedObserver = true;
|
||||
this._destroyed = false;
|
||||
|
||||
this.searchService.init((function search_init_cb(aStatus) {
|
||||
// Bail out if the binding's been destroyed
|
||||
@ -103,12 +103,9 @@
|
||||
<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;
|
||||
}
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
os.removeObserver(this, "browser-search-engine-modified");
|
||||
|
||||
// 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