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

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

parent 2e188c96
......@@ -703,12 +703,8 @@ static ULONG WINAPI HTMLStyleSheetsCollection_Release(IHTMLStyleSheetsCollection
TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) {
if(!ref)
release_dispex(&This->dispex);
if(This->nslist)
nsIDOMStyleSheetList_Release(This->nslist);
free(This);
}
return ref;
}
......@@ -844,6 +840,18 @@ static inline HTMLStyleSheetsCollection *HTMLStyleSheetsCollection_from_Dispatch
return CONTAINING_RECORD(iface, HTMLStyleSheetsCollection, dispex);
}
static void HTMLStyleSheetsCollection_unlink(DispatchEx *dispex)
{
HTMLStyleSheetsCollection *This = HTMLStyleSheetsCollection_from_DispatchEx(dispex);
unlink_ref(&This->nslist);
}
static void HTMLStyleSheetsCollection_destructor(DispatchEx *dispex)
{
HTMLStyleSheetsCollection *This = HTMLStyleSheetsCollection_from_DispatchEx(dispex);
free(This);
}
static HRESULT HTMLStyleSheetsCollection_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
{
HTMLStyleSheetsCollection *This = HTMLStyleSheetsCollection_from_DispatchEx(dispex);
......@@ -921,8 +929,8 @@ static HRESULT HTMLStyleSheetsCollection_invoke(DispatchEx *dispex, DISPID id, L
}
static const dispex_static_data_vtbl_t HTMLStyleSheetsCollection_dispex_vtbl = {
NULL,
NULL,
HTMLStyleSheetsCollection_destructor,
HTMLStyleSheetsCollection_unlink,
NULL,
HTMLStyleSheetsCollection_get_dispid,
HTMLStyleSheetsCollection_get_name,
......
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