Commit ae9aa7ec authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Use unlink and destructor in the vtbl for CSSStyle.

parent 6ad4dd01
......@@ -4772,12 +4772,8 @@ static ULONG WINAPI HTMLCSSStyleDeclaration_Release(IHTMLCSSStyleDeclaration *if
TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) {
if(This->nsstyle)
nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
if(!ref)
release_dispex(&This->dispex);
free(This);
}
return ref;
}
......@@ -9969,6 +9965,18 @@ static inline CSSStyle *impl_from_DispatchEx(DispatchEx *dispex)
return CONTAINING_RECORD(dispex, CSSStyle, dispex);
}
static void CSSStyle_unlink(DispatchEx *dispex)
{
CSSStyle *This = impl_from_DispatchEx(dispex);
unlink_ref(&This->nsstyle);
}
static void CSSStyle_destructor(DispatchEx *dispex)
{
CSSStyle *This = impl_from_DispatchEx(dispex);
free(This);
}
static HRESULT CSSStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
{
CSSStyle *This = impl_from_DispatchEx(dispex);
......@@ -9997,8 +10005,8 @@ void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
}
const dispex_static_data_vtbl_t CSSStyle_dispex_vtbl = {
NULL,
NULL,
CSSStyle_destructor,
CSSStyle_unlink,
NULL,
CSSStyle_get_dispid,
NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment