mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-19 00:03:29 +00:00
mshtml: Use unlink and destructor in the vtbl for HTMLDOMImplementation.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
62d39e86b3
commit
5a687bb49c
|
@ -99,13 +99,8 @@ static ULONG WINAPI HTMLDOMImplementation_Release(IHTMLDOMImplementation *iface)
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", This, ref);
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
assert(!This->browser);
|
|
||||||
if(This->implementation)
|
|
||||||
nsIDOMDOMImplementation_Release(This->implementation);
|
|
||||||
release_dispex(&This->dispex);
|
release_dispex(&This->dispex);
|
||||||
free(This);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -294,6 +289,29 @@ static const IHTMLDOMImplementation2Vtbl HTMLDOMImplementation2Vtbl = {
|
||||||
HTMLDOMImplementation2_hasFeature
|
HTMLDOMImplementation2_hasFeature
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline HTMLDOMImplementation *HTMLDOMImplementation_from_DispatchEx(DispatchEx *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLDOMImplementation, dispex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLDOMImplementation_unlink(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLDOMImplementation *This = HTMLDOMImplementation_from_DispatchEx(dispex);
|
||||||
|
unlink_ref(&This->implementation);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLDOMImplementation_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLDOMImplementation *This = HTMLDOMImplementation_from_DispatchEx(dispex);
|
||||||
|
assert(!This->browser);
|
||||||
|
free(This);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const dispex_static_data_vtbl_t HTMLDOMImplementation_dispex_vtbl = {
|
||||||
|
HTMLDOMImplementation_destructor,
|
||||||
|
HTMLDOMImplementation_unlink
|
||||||
|
};
|
||||||
|
|
||||||
static void HTMLDOMImplementation_init_dispex_info(dispex_data_t *info, compat_mode_t compat_mode)
|
static void HTMLDOMImplementation_init_dispex_info(dispex_data_t *info, compat_mode_t compat_mode)
|
||||||
{
|
{
|
||||||
if(compat_mode >= COMPAT_MODE_IE9)
|
if(compat_mode >= COMPAT_MODE_IE9)
|
||||||
|
@ -306,7 +324,7 @@ static const tid_t HTMLDOMImplementation_iface_tids[] = {
|
||||||
};
|
};
|
||||||
static dispex_static_data_t HTMLDOMImplementation_dispex = {
|
static dispex_static_data_t HTMLDOMImplementation_dispex = {
|
||||||
L"DOMImplementation",
|
L"DOMImplementation",
|
||||||
NULL,
|
&HTMLDOMImplementation_dispex_vtbl,
|
||||||
DispHTMLDOMImplementation_tid,
|
DispHTMLDOMImplementation_tid,
|
||||||
HTMLDOMImplementation_iface_tids,
|
HTMLDOMImplementation_iface_tids,
|
||||||
HTMLDOMImplementation_init_dispex_info
|
HTMLDOMImplementation_init_dispex_info
|
||||||
|
|
Loading…
Reference in a new issue