Module: wine Branch: master Commit: dbf0e43ff84f30789f89249e3ef7e65c727ce66c URL: https://gitlab.winehq.org/wine/wine/-/commit/dbf0e43ff84f30789f89249e3ef7e65...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu Nov 2 16:11:20 2023 +0200
mshtml: Traverse and unlink the style_sheet referenced from the StyleElement.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/mshtml/htmlstyleelem.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c index c69b0df505d..5b3d9165964 100644 --- a/dlls/mshtml/htmlstyleelem.c +++ b/dlls/mshtml/htmlstyleelem.c @@ -382,6 +382,8 @@ static void HTMLStyleElement_traverse(DispatchEx *dispex, nsCycleCollectionTrave HTMLStyleElement *This = impl_from_DispatchEx(dispex); HTMLElement_traverse(dispex, cb);
+ if(This->style_sheet) + note_cc_edge((nsISupports*)This->style_sheet, "style_sheet", cb); if(This->nsstyle) note_cc_edge((nsISupports*)This->nsstyle, "nsstyle", cb); } @@ -390,15 +392,8 @@ static void HTMLStyleElement_unlink(DispatchEx *dispex) { HTMLStyleElement *This = impl_from_DispatchEx(dispex); HTMLElement_unlink(dispex); - unlink_ref(&This->nsstyle); -} - -static void HTMLStyleElement_destructor(DispatchEx *dispex) -{ - HTMLStyleElement *This = impl_from_DispatchEx(dispex); - unlink_ref(&This->style_sheet); - HTMLElement_destructor(dispex); + unlink_ref(&This->nsstyle); }
static void HTMLStyleElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode) @@ -429,7 +424,7 @@ static const event_target_vtbl_t HTMLStyleElement_event_target_vtbl = { { HTMLELEMENT_DISPEX_VTBL_ENTRIES, .query_interface= HTMLStyleElement_query_interface, - .destructor = HTMLStyleElement_destructor, + .destructor = HTMLElement_destructor, .traverse = HTMLStyleElement_traverse, .unlink = HTMLStyleElement_unlink },