Commit a19caad9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Get rid of no loner needed document node reference in HTMLDOMChildrenCollection.

parent 69af9a4c
......@@ -4306,7 +4306,7 @@ static HRESULT WINAPI DocumentSelector_querySelectorAll(IDocumentSelector *iface
return E_FAIL;
}
*pel = create_child_collection(This->doc_node, node_list);
*pel = create_child_collection(node_list);
nsIDOMNodeList_Release(node_list);
return *pel ? S_OK : E_OUTOFMEMORY;
}
......
......@@ -4964,7 +4964,7 @@ static HRESULT WINAPI ElementSelector_querySelectorAll(IElementSelector *iface,
return E_FAIL;
}
*pel = create_child_collection(This->node.doc, node_list);
*pel = create_child_collection(node_list);
nsIDOMNodeList_Release(node_list);
return *pel ? S_OK : E_OUTOFMEMORY;
}
......
......@@ -44,9 +44,6 @@ typedef struct {
LONG ref;
/* FIXME: implement weak reference */
HTMLDocumentNode *doc;
nsIDOMNodeList *nslist;
} HTMLDOMChildrenCollection;
......@@ -244,7 +241,6 @@ static ULONG WINAPI HTMLDOMChildrenCollection_Release(IHTMLDOMChildrenCollection
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
htmldoc_release(&This->doc->basedoc);
nsIDOMNodeList_Release(This->nslist);
heap_free(This);
}
......@@ -440,7 +436,7 @@ static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
HTMLDOMNode_init_dispex_info
};
IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode *doc, nsIDOMNodeList *nslist)
IHTMLDOMChildrenCollection *create_child_collection(nsIDOMNodeList *nslist)
{
HTMLDOMChildrenCollection *ret;
......@@ -454,9 +450,6 @@ IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode *doc, nsIDO
nsIDOMNodeList_AddRef(nslist);
ret->nslist = nslist;
htmldoc_addref(&doc->basedoc);
ret->doc = doc;
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMChildrenCollection_iface,
&HTMLDOMChildrenCollection_dispex);
......@@ -628,7 +621,7 @@ static HRESULT WINAPI HTMLDOMNode_get_childNodes(IHTMLDOMNode *iface, IDispatch
return E_FAIL;
}
*p = (IDispatch*)create_child_collection(This->doc, nslist);
*p = (IDispatch*)create_child_collection(nslist);
nsIDOMNodeList_Release(nslist);
return *p ? S_OK : E_OUTOFMEMORY;
......
......@@ -1089,7 +1089,7 @@ HRESULT wrap_iface(IUnknown*,IUnknown*,IUnknown**) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
IHTMLDOMChildrenCollection *create_child_collection(nsIDOMNodeList*) DECLSPEC_HIDDEN;
HRESULT attr_value_to_string(VARIANT*) DECLSPEC_HIDDEN;
HRESULT get_elem_attr_value_by_dispid(HTMLElement*,DISPID,VARIANT*) DECLSPEC_HIDDEN;
......
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