mshtml: Don't assume that HTMLWindow_Create sets ret val before succeeding.
This commit is contained in:
parent
2ca58402e7
commit
1913ff3a42
|
@ -2019,7 +2019,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
|
||||||
if(!doc)
|
if(!doc)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
if(window == doc_obj->basedoc.window)
|
if(!doc_obj->basedoc.window || window == doc_obj->basedoc.window)
|
||||||
doc->basedoc.cp_container.forward_container = &doc_obj->basedoc.cp_container;
|
doc->basedoc.cp_container.forward_container = &doc_obj->basedoc.cp_container;
|
||||||
|
|
||||||
nsIDOMHTMLDocument_AddRef(nsdoc);
|
nsIDOMHTMLDocument_AddRef(nsdoc);
|
||||||
|
|
|
@ -2247,7 +2247,6 @@ HRESULT HTMLWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, HTML
|
||||||
list_init(&window->script_hosts);
|
list_init(&window->script_hosts);
|
||||||
|
|
||||||
window->task_magic = get_task_target_magic();
|
window->task_magic = get_task_target_magic();
|
||||||
*ret = window;
|
|
||||||
update_window_doc(window);
|
update_window_doc(window);
|
||||||
|
|
||||||
list_init(&window->children);
|
list_init(&window->children);
|
||||||
|
@ -2260,6 +2259,7 @@ HRESULT HTMLWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, HTML
|
||||||
list_add_tail(&parent->children, &window->sibling_entry);
|
list_add_tail(&parent->children, &window->sibling_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*ret = window;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue