mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:06:52 +00:00
mshtml: Use unlink and destructor in the vtbl for Console.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
915c391014
commit
a916bc768d
|
@ -2609,10 +2609,8 @@ static ULONG WINAPI console_Release(IWineMSHTMLConsole *iface)
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", console, ref);
|
TRACE("(%p) ref=%ld\n", console, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
release_dispex(&console->dispex);
|
release_dispex(&console->dispex);
|
||||||
free(console);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -2789,13 +2787,28 @@ static const IWineMSHTMLConsoleVtbl WineMSHTMLConsoleVtbl = {
|
||||||
console_warn,
|
console_warn,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline struct console *console_from_DispatchEx(DispatchEx *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, struct console, dispex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void console_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
struct console *console = console_from_DispatchEx(dispex);
|
||||||
|
free(console);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const dispex_static_data_vtbl_t console_dispex_vtbl = {
|
||||||
|
console_destructor,
|
||||||
|
};
|
||||||
|
|
||||||
static const tid_t console_iface_tids[] = {
|
static const tid_t console_iface_tids[] = {
|
||||||
IWineMSHTMLConsole_tid,
|
IWineMSHTMLConsole_tid,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
static dispex_static_data_t console_dispex = {
|
static dispex_static_data_t console_dispex = {
|
||||||
L"Console",
|
L"Console",
|
||||||
NULL,
|
&console_dispex_vtbl,
|
||||||
IWineMSHTMLConsole_tid,
|
IWineMSHTMLConsole_tid,
|
||||||
console_iface_tids
|
console_iface_tids
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue