Commit 355eb6b9 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent 6a1b12bd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment