mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 09:57:19 +00:00
mshtml: Don't hold ref to the created window in the FrameBase.
Note that for the case when mozwindow_to_window returns an existing window, no ref is added to it anyway, so this is just leaking. Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
6a1b12bd8f
commit
355eb6b91b
|
@ -48,9 +48,14 @@ static HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
|
|||
return E_FAIL;
|
||||
|
||||
window = mozwindow_to_window(mozwindow);
|
||||
if(!window && frame->element.node.doc->browser)
|
||||
if(!window && frame->element.node.doc->browser) {
|
||||
hres = create_outer_window(frame->element.node.doc->browser, mozwindow,
|
||||
frame->element.node.doc->outer_window, &window);
|
||||
|
||||
/* Don't hold ref to the created window; the parent keeps ref to it */
|
||||
if(SUCCEEDED(hres))
|
||||
IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
|
||||
}
|
||||
mozIDOMWindowProxy_Release(mozwindow);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
|
Loading…
Reference in a new issue