mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1110872 - Readd cleanup for live locks in SettingsManager; r=gerard-majax
This commit is contained in:
parent
9e3264e649
commit
4a8dafbd8f
@ -462,6 +462,17 @@ SettingsManager.prototype = {
|
||||
|
||||
cleanup: function() {
|
||||
Services.obs.removeObserver(this, "inner-window-destroyed");
|
||||
// At this point, the window is dying, so there's nothing left
|
||||
// that we could do with our lock. Go ahead and run finalize on
|
||||
// it to make sure changes are commited.
|
||||
for (let i = 0; i < this._locks.length; ++i) {
|
||||
if (DEBUG) debug("Lock alive at destroy, finalizing: " + this._locks[i]);
|
||||
// Due to bug 1105511 we should be able to send this without
|
||||
// cached principals. However, this is scary because any iframe
|
||||
// in the process could run this?
|
||||
cpmm.sendAsyncMessage("Settings:Finalize",
|
||||
{lockID: this._locks[i]});
|
||||
}
|
||||
cpmm.removeMessageListener("Settings:Change:Return:OK", this);
|
||||
mrm.unregisterStrongReporter(this);
|
||||
this.innerWindowID = null;
|
||||
|
Loading…
Reference in New Issue
Block a user