mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:47:07 +00:00
mshtml: Use unlink and destructor in the vtbl for HTMLPerformance.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
8dac93e6d1
commit
21abb999d9
|
@ -2217,13 +2217,8 @@ static ULONG WINAPI HTMLPerformance_Release(IHTMLPerformance *iface)
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", This, ref);
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
IHTMLPerformanceTiming_Release(&This->timing->IHTMLPerformanceTiming_iface);
|
|
||||||
if(This->navigation)
|
|
||||||
IHTMLPerformanceNavigation_Release(This->navigation);
|
|
||||||
release_dispex(&This->dispex);
|
release_dispex(&This->dispex);
|
||||||
free(This);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -2332,13 +2327,40 @@ static const IHTMLPerformanceVtbl HTMLPerformanceVtbl = {
|
||||||
HTMLPerformance_toJSON
|
HTMLPerformance_toJSON
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline HTMLPerformance *HTMLPerformance_from_DispatchEx(DispatchEx *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLPerformance, dispex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLPerformance_unlink(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLPerformance *This = HTMLPerformance_from_DispatchEx(dispex);
|
||||||
|
unlink_ref(&This->navigation);
|
||||||
|
if(This->timing) {
|
||||||
|
HTMLPerformanceTiming *timing = This->timing;
|
||||||
|
This->timing = NULL;
|
||||||
|
IHTMLPerformanceTiming_Release(&timing->IHTMLPerformanceTiming_iface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLPerformance_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLPerformance *This = HTMLPerformance_from_DispatchEx(dispex);
|
||||||
|
free(This);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const dispex_static_data_vtbl_t HTMLPerformance_dispex_vtbl = {
|
||||||
|
HTMLPerformance_destructor,
|
||||||
|
HTMLPerformance_unlink
|
||||||
|
};
|
||||||
|
|
||||||
static const tid_t HTMLPerformance_iface_tids[] = {
|
static const tid_t HTMLPerformance_iface_tids[] = {
|
||||||
IHTMLPerformance_tid,
|
IHTMLPerformance_tid,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
static dispex_static_data_t HTMLPerformance_dispex = {
|
static dispex_static_data_t HTMLPerformance_dispex = {
|
||||||
L"Performance",
|
L"Performance",
|
||||||
NULL,
|
&HTMLPerformance_dispex_vtbl,
|
||||||
IHTMLPerformance_tid,
|
IHTMLPerformance_tid,
|
||||||
HTMLPerformance_iface_tids
|
HTMLPerformance_iface_tids
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue