mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:57:22 +00:00
mshtml: Use unlink and destructor in the vtbl for HTMLDOMAttribute.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
1904dd0be3
commit
62d39e86b3
|
@ -79,13 +79,8 @@ static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface)
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", This, ref);
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
assert(!This->elem);
|
|
||||||
release_dispex(&This->dispex);
|
release_dispex(&This->dispex);
|
||||||
VariantClear(&This->value);
|
|
||||||
free(This->name);
|
|
||||||
free(This);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -480,6 +475,31 @@ static const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl = {
|
||||||
HTMLDOMAttribute2_cloneNode
|
HTMLDOMAttribute2_cloneNode
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline HTMLDOMAttribute *impl_from_DispatchEx(DispatchEx *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLDOMAttribute, dispex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLDOMAttribute_unlink(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLDOMAttribute *This = impl_from_DispatchEx(dispex);
|
||||||
|
unlink_variant(&This->value);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLDOMAttribute_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLDOMAttribute *This = impl_from_DispatchEx(dispex);
|
||||||
|
assert(!This->elem);
|
||||||
|
VariantClear(&This->value);
|
||||||
|
free(This->name);
|
||||||
|
free(This);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const dispex_static_data_vtbl_t HTMLDOMAttribute_dispex_vtbl = {
|
||||||
|
HTMLDOMAttribute_destructor,
|
||||||
|
HTMLDOMAttribute_unlink
|
||||||
|
};
|
||||||
|
|
||||||
static const tid_t HTMLDOMAttribute_iface_tids[] = {
|
static const tid_t HTMLDOMAttribute_iface_tids[] = {
|
||||||
IHTMLDOMAttribute_tid,
|
IHTMLDOMAttribute_tid,
|
||||||
IHTMLDOMAttribute2_tid,
|
IHTMLDOMAttribute2_tid,
|
||||||
|
@ -487,7 +507,7 @@ static const tid_t HTMLDOMAttribute_iface_tids[] = {
|
||||||
};
|
};
|
||||||
static dispex_static_data_t HTMLDOMAttribute_dispex = {
|
static dispex_static_data_t HTMLDOMAttribute_dispex = {
|
||||||
L"Attr",
|
L"Attr",
|
||||||
NULL,
|
&HTMLDOMAttribute_dispex_vtbl,
|
||||||
DispHTMLDOMAttribute_tid,
|
DispHTMLDOMAttribute_tid,
|
||||||
HTMLDOMAttribute_iface_tids
|
HTMLDOMAttribute_iface_tids
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue