mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 15:14:29 +00:00
mshtml: Use unlink and destructor in the vtbl for HTMLAttributeCollection.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
d5e6c2a581
commit
6919d553aa
|
@ -8594,17 +8594,8 @@ static ULONG WINAPI HTMLAttributeCollection_Release(IHTMLAttributeCollection *if
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", This, ref);
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
while(!list_empty(&This->attrs)) {
|
release_dispex(&This->dispex);
|
||||||
HTMLDOMAttribute *attr = LIST_ENTRY(list_head(&This->attrs), HTMLDOMAttribute, entry);
|
|
||||||
|
|
||||||
list_remove(&attr->entry);
|
|
||||||
attr->elem = NULL;
|
|
||||||
IHTMLDOMAttribute_Release(&attr->IHTMLDOMAttribute_iface);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(This);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -8953,6 +8944,24 @@ static inline HTMLAttributeCollection *HTMLAttributeCollection_from_DispatchEx(D
|
||||||
return CONTAINING_RECORD(iface, HTMLAttributeCollection, dispex);
|
return CONTAINING_RECORD(iface, HTMLAttributeCollection, dispex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void HTMLAttributeCollection_unlink(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
|
||||||
|
while(!list_empty(&This->attrs)) {
|
||||||
|
HTMLDOMAttribute *attr = LIST_ENTRY(list_head(&This->attrs), HTMLDOMAttribute, entry);
|
||||||
|
|
||||||
|
list_remove(&attr->entry);
|
||||||
|
attr->elem = NULL;
|
||||||
|
IHTMLDOMAttribute_Release(&attr->IHTMLDOMAttribute_iface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLAttributeCollection_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
|
||||||
|
free(This);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
|
static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
|
||||||
{
|
{
|
||||||
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
|
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
|
||||||
|
@ -9019,8 +9028,8 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
|
||||||
}
|
}
|
||||||
|
|
||||||
static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = {
|
static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = {
|
||||||
NULL,
|
HTMLAttributeCollection_destructor,
|
||||||
NULL,
|
HTMLAttributeCollection_unlink,
|
||||||
NULL,
|
NULL,
|
||||||
HTMLAttributeCollection_get_dispid,
|
HTMLAttributeCollection_get_dispid,
|
||||||
HTMLAttributeCollection_get_name,
|
HTMLAttributeCollection_get_name,
|
||||||
|
|
Loading…
Reference in a new issue