mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 802823 - Early cleanup of message listeners in ActivityProxy.js [r=gwagner]
This commit is contained in:
parent
035e8b8432
commit
dd2ebe02d8
@ -80,12 +80,17 @@ ActivityProxy.prototype = {
|
||||
Services.DOMRequest.fireError(this.activity, msg.error);
|
||||
break;
|
||||
}
|
||||
// We can only get one FireSuccess / FireError message, so cleanup as soon as possible.
|
||||
this.cleanup();
|
||||
},
|
||||
|
||||
cleanup: function actProxy_cleanup() {
|
||||
debug("cleanup");
|
||||
cpmm.removeMessageListener("Activity:FireSuccess", this);
|
||||
cpmm.removeMessageListener("Activity:FireError", this);
|
||||
if (!this.cleanedUp) {
|
||||
cpmm.removeMessageListener("Activity:FireSuccess", this);
|
||||
cpmm.removeMessageListener("Activity:FireError", this);
|
||||
}
|
||||
this.cleanedUp = true;
|
||||
},
|
||||
|
||||
classID: Components.ID("{ba9bd5cb-76a0-4ecf-a7b3-d2f7c43c5949}"),
|
||||
|
Loading…
Reference in New Issue
Block a user