mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Null out browser's focusedWindow field as well (to prevent leaks). b=283063 r=mconnor
This commit is contained in:
parent
aac621dcf4
commit
48836e0727
@ -1139,7 +1139,16 @@
|
||||
// clean up the before/afterselected attributes before removing the tab
|
||||
oldTab.selected = false;
|
||||
|
||||
// XXX browser's destructor isn't always called, so we force a cleanup ourselves
|
||||
// Because of the way XBL works (fields just set JS
|
||||
// properties on the element) and the code we have in place
|
||||
// to preserve the JS objects for any elements that have
|
||||
// JS properties set on them, the browser element won't be
|
||||
// destroyed until the document goes away. So we force a
|
||||
// cleanup ourselves.
|
||||
// This has to hapen before we remove the child so that the
|
||||
// XBL implementation of nsIObserver still works. But
|
||||
// clearing focusedWindow happens below because it gets
|
||||
// reset by updateCurrentBrowser.
|
||||
oldBrowser.destroy();
|
||||
|
||||
this.mTabContainer.removeChild(oldTab);
|
||||
@ -1149,6 +1158,9 @@
|
||||
this.mPanelContainer.selectedIndex = newIndex;
|
||||
|
||||
this.updateCurrentBrowser();
|
||||
|
||||
// see comment above destroy above
|
||||
oldBrowser.focusedWindow = null;
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user