mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787236 - Correctly remove "pagehide" listener when exiting Reader (r=mfinkle)
This commit is contained in:
parent
fa30605428
commit
ffb440fb73
@ -2689,10 +2689,12 @@ Tab.prototype = {
|
|||||||
|
|
||||||
if (/^about:reader/.test(target.documentURI)) {
|
if (/^about:reader/.test(target.documentURI)) {
|
||||||
let aboutReader = new AboutReader(this.browser.contentDocument, this.browser.contentWindow);
|
let aboutReader = new AboutReader(this.browser.contentDocument, this.browser.contentWindow);
|
||||||
this.browser.addEventListener("pagehide", function listener() {
|
let listener = function() {
|
||||||
aboutReader.uninit();
|
aboutReader.uninit();
|
||||||
this.browser.removeEventListener("pagehide", listener, true);
|
this.browser.removeEventListener("pagehide", listener, true);
|
||||||
}.bind(this), true);
|
}.bind(this);
|
||||||
|
|
||||||
|
this.browser.addEventListener("pagehide", listener, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user