winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
667 discussions
Start a n
N
ew thread
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLTextRange.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 32d372ed60c654e7b47aa4bf2a03f9efea246711 URL:
https://gitlab.winehq.org/wine/wine/-/commit/32d372ed60c654e7b47aa4bf2a03f9…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for HTMLTextRange. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/range.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/range.c b/dlls/mshtml/range.c index 3ac3fcb73a4..4d732fb891b 100644 --- a/dlls/mshtml/range.c +++ b/dlls/mshtml/range.c @@ -37,8 +37,6 @@ typedef struct { IHTMLTxtRange IHTMLTxtRange_iface; IOleCommandTarget IOleCommandTarget_iface; - LONG ref; - nsIDOMRange *nsrange; HTMLDocumentNode *doc; @@ -826,7 +824,7 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r *ppv = &This->IHTMLTxtRange_iface; }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { *ppv = &This->IOleCommandTarget_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { *ppv = NULL; @@ -841,7 +839,7 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r static ULONG WINAPI HTMLTxtRange_AddRef(IHTMLTxtRange *iface) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -851,13 +849,10 @@ static ULONG WINAPI HTMLTxtRange_AddRef(IHTMLTxtRange *iface) static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -1717,6 +1712,13 @@ static inline HTMLTxtRange *HTMLTxtRange_from_DispatchEx(DispatchEx *iface) return CONTAINING_RECORD(iface, HTMLTxtRange, dispex); } +static void HTMLTxtRange_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLTxtRange *This = HTMLTxtRange_from_DispatchEx(dispex); + if(This->nsrange) + note_cc_edge((nsISupports*)This->nsrange, "nsrange", cb); +} + static void HTMLTxtRange_unlink(DispatchEx *dispex) { HTMLTxtRange *This = HTMLTxtRange_from_DispatchEx(dispex); @@ -1735,6 +1737,7 @@ static void HTMLTxtRange_destructor(DispatchEx *dispex) static const dispex_static_data_vtbl_t HTMLTxtRange_dispex_vtbl = { .destructor = HTMLTxtRange_destructor, + .traverse = HTMLTxtRange_traverse, .unlink = HTMLTxtRange_unlink }; @@ -1762,7 +1765,6 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx ret->IHTMLTxtRange_iface.lpVtbl = &HTMLTxtRangeVtbl; ret->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl; - ret->ref = 1; if(nsrange) nsIDOMRange_AddRef(nsrange);
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for MediaQueryList.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 98e0cd857772e00f4ffecf425d323b10b61eb855 URL:
https://gitlab.winehq.org/wine/wine/-/commit/98e0cd857772e00f4ffecf425d323b…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for MediaQueryList. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index a22abe2045e..9713e9c0b80 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -2826,7 +2826,6 @@ struct media_query_list_callback; struct media_query_list { DispatchEx dispex; IWineMSHTMLMediaQueryList IWineMSHTMLMediaQueryList_iface; - LONG ref; nsIDOMMediaQueryList *nsquerylist; struct media_query_list_callback *callback; struct list listeners; @@ -2851,7 +2850,7 @@ static HRESULT WINAPI media_query_list_QueryInterface(IWineMSHTMLMediaQueryList if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IWineMSHTMLMediaQueryList, riid)) { *ppv = &media_query_list->IWineMSHTMLMediaQueryList_iface; - }else if(dispex_query_interface_no_cc(&media_query_list->dispex, riid, ppv)) { + }else if(dispex_query_interface(&media_query_list->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { *ppv = NULL; @@ -2865,7 +2864,7 @@ static HRESULT WINAPI media_query_list_QueryInterface(IWineMSHTMLMediaQueryList static ULONG WINAPI media_query_list_AddRef(IWineMSHTMLMediaQueryList *iface) { struct media_query_list *media_query_list = impl_from_IWineMSHTMLMediaQueryList(iface); - LONG ref = InterlockedIncrement(&media_query_list->ref); + LONG ref = dispex_ref_incr(&media_query_list->dispex); TRACE("(%p) ref=%ld\n", media_query_list, ref); @@ -2875,13 +2874,10 @@ static ULONG WINAPI media_query_list_AddRef(IWineMSHTMLMediaQueryList *iface) static ULONG WINAPI media_query_list_Release(IWineMSHTMLMediaQueryList *iface) { struct media_query_list *media_query_list = impl_from_IWineMSHTMLMediaQueryList(iface); - LONG ref = InterlockedDecrement(&media_query_list->ref); + LONG ref = dispex_ref_decr(&media_query_list->dispex); TRACE("(%p) ref=%ld\n", media_query_list, ref); - if(!ref) - release_dispex(&media_query_list->dispex); - return ref; } @@ -3106,6 +3102,17 @@ static inline struct media_query_list *media_query_list_from_DispatchEx(Dispatch return CONTAINING_RECORD(iface, struct media_query_list, dispex); } +static void media_query_list_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + struct media_query_list *media_query_list = media_query_list_from_DispatchEx(dispex); + struct media_query_list_listener *listener; + + LIST_FOR_EACH_ENTRY(listener, &media_query_list->listeners, struct media_query_list_listener, entry) + note_cc_edge((nsISupports*)listener->function, "function", cb); + if(media_query_list->nsquerylist) + note_cc_edge((nsISupports*)media_query_list->nsquerylist, "nsquerylist", cb); +} + static void media_query_list_unlink(DispatchEx *dispex) { struct media_query_list *media_query_list = media_query_list_from_DispatchEx(dispex); @@ -3129,6 +3136,7 @@ static void media_query_list_destructor(DispatchEx *dispex) static const dispex_static_data_vtbl_t media_query_list_dispex_vtbl = { .destructor = media_query_list_destructor, + .traverse = media_query_list_traverse, .unlink = media_query_list_unlink }; @@ -3180,7 +3188,6 @@ HRESULT create_media_query_list(HTMLWindow *window, BSTR media_query, IDispatch assert(NS_SUCCEEDED(nsres)); media_query_list->IWineMSHTMLMediaQueryList_iface.lpVtbl = &media_query_list_vtbl; - media_query_list->ref = 1; list_init(&media_query_list->listeners); init_dispatch(&media_query_list->dispex, (IUnknown*)&media_query_list->IWineMSHTMLMediaQueryList_iface, &media_query_list_dispex, dispex_compat_mode(&window->inner_window->event_target.dispex));
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLDOMImplementation.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 48dd94713cc1ef7a76399eebdc4e75302bf3d477 URL:
https://gitlab.winehq.org/wine/wine/-/commit/48dd94713cc1ef7a76399eebdc4e75…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for HTMLDOMImplementation. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index e830ab33a33..a22abe2045e 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -47,8 +47,6 @@ typedef struct { IHTMLDOMImplementation IHTMLDOMImplementation_iface; IHTMLDOMImplementation2 IHTMLDOMImplementation2_iface; - LONG ref; - nsIDOMDOMImplementation *implementation; GeckoBrowser *browser; } HTMLDOMImplementation; @@ -68,7 +66,7 @@ static HRESULT WINAPI HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementatio *ppv = &This->IHTMLDOMImplementation_iface; }else if(IsEqualGUID(&IID_IHTMLDOMImplementation2, riid)) { *ppv = &This->IHTMLDOMImplementation2_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid)); @@ -83,7 +81,7 @@ static HRESULT WINAPI HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementatio static ULONG WINAPI HTMLDOMImplementation_AddRef(IHTMLDOMImplementation *iface) { HTMLDOMImplementation *This = impl_from_IHTMLDOMImplementation(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -93,13 +91,10 @@ static ULONG WINAPI HTMLDOMImplementation_AddRef(IHTMLDOMImplementation *iface) static ULONG WINAPI HTMLDOMImplementation_Release(IHTMLDOMImplementation *iface) { HTMLDOMImplementation *This = impl_from_IHTMLDOMImplementation(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -292,6 +287,13 @@ static inline HTMLDOMImplementation *HTMLDOMImplementation_from_DispatchEx(Dispa return CONTAINING_RECORD(iface, HTMLDOMImplementation, dispex); } +static void HTMLDOMImplementation_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLDOMImplementation *This = HTMLDOMImplementation_from_DispatchEx(dispex); + if(This->implementation) + note_cc_edge((nsISupports*)This->implementation, "implementation", cb); +} + static void HTMLDOMImplementation_unlink(DispatchEx *dispex) { HTMLDOMImplementation *This = HTMLDOMImplementation_from_DispatchEx(dispex); @@ -307,6 +309,7 @@ static void HTMLDOMImplementation_destructor(DispatchEx *dispex) static const dispex_static_data_vtbl_t HTMLDOMImplementation_dispex_vtbl = { .destructor = HTMLDOMImplementation_destructor, + .traverse = HTMLDOMImplementation_traverse, .unlink = HTMLDOMImplementation_unlink }; @@ -342,7 +345,6 @@ HRESULT create_dom_implementation(HTMLDocumentNode *doc_node, IHTMLDOMImplementa dom_implementation->IHTMLDOMImplementation_iface.lpVtbl = &HTMLDOMImplementationVtbl; dom_implementation->IHTMLDOMImplementation2_iface.lpVtbl = &HTMLDOMImplementation2Vtbl; - dom_implementation->ref = 1; dom_implementation->browser = doc_node->browser; init_dispatch(&dom_implementation->dispex, (IUnknown*)&dom_implementation->IHTMLDOMImplementation_iface,
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for MutationObserver.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 17dc0be9656dba06b94d872b34cd440c9f0723cf URL:
https://gitlab.winehq.org/wine/wine/-/commit/17dc0be9656dba06b94d872b34cd44…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for MutationObserver. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/mutation.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 13c95eeac05..1abb2d88839 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -1080,7 +1080,6 @@ void init_mutation(nsIComponentManager *component_manager) struct mutation_observer { IWineMSHTMLMutationObserver IWineMSHTMLMutationObserver_iface; - LONG ref; DispatchEx dispex; IDispatch *callback; }; @@ -1098,7 +1097,7 @@ static HRESULT WINAPI MutationObserver_QueryInterface(IWineMSHTMLMutationObserve if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IWineMSHTMLMutationObserver, riid)) { *ppv = &This->IWineMSHTMLMutationObserver_iface; - } else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + } else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; } else { WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); @@ -1113,7 +1112,7 @@ static HRESULT WINAPI MutationObserver_QueryInterface(IWineMSHTMLMutationObserve static ULONG WINAPI MutationObserver_AddRef(IWineMSHTMLMutationObserver *iface) { struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -1123,13 +1122,10 @@ static ULONG WINAPI MutationObserver_AddRef(IWineMSHTMLMutationObserver *iface) static ULONG WINAPI MutationObserver_Release(IWineMSHTMLMutationObserver *iface) { struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -1215,6 +1211,13 @@ static inline struct mutation_observer *mutation_observer_from_DispatchEx(Dispat return CONTAINING_RECORD(iface, struct mutation_observer, dispex); } +static void mutation_observer_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + struct mutation_observer *This = mutation_observer_from_DispatchEx(dispex); + if(This->callback) + note_cc_edge((nsISupports*)This->callback, "callback", cb); +} + static void mutation_observer_unlink(DispatchEx *dispex) { struct mutation_observer *This = mutation_observer_from_DispatchEx(dispex); @@ -1229,6 +1232,7 @@ static void mutation_observer_destructor(DispatchEx *dispex) static const dispex_static_data_vtbl_t mutation_observer_dispex_vtbl = { .destructor = mutation_observer_destructor, + .traverse = mutation_observer_traverse, .unlink = mutation_observer_unlink }; @@ -1258,7 +1262,6 @@ static HRESULT create_mutation_observer(compat_mode_t compat_mode, IDispatch *ca } obj->IWineMSHTMLMutationObserver_iface.lpVtbl = &WineMSHTMLMutationObserverVtbl; - obj->ref = 1; init_dispatch(&obj->dispex, (IUnknown*)&obj->IWineMSHTMLMutationObserver_iface, &mutation_observer_dispex, compat_mode);
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for DOMTokenList.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: de720483da67f99656204b0f50a9802bbef35dad URL:
https://gitlab.winehq.org/wine/wine/-/commit/de720483da67f99656204b0f50a980…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for DOMTokenList. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index e99c5813609..991f960f0ca 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7374,8 +7374,6 @@ struct token_list { DispatchEx dispex; IWineDOMTokenList IWineDOMTokenList_iface; IHTMLElement *element; - - LONG ref; }; static inline struct token_list *impl_from_IWineDOMTokenList(IWineDOMTokenList *iface) @@ -7393,7 +7391,7 @@ static HRESULT WINAPI token_list_QueryInterface(IWineDOMTokenList *iface, REFIID *ppv = &token_list->IWineDOMTokenList_iface; }else if(IsEqualGUID(&IID_IWineDOMTokenList, riid)) { *ppv = &token_list->IWineDOMTokenList_iface; - }else if(dispex_query_interface_no_cc(&token_list->dispex, riid, ppv)) { + }else if(dispex_query_interface(&token_list->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { WARN("(%p)->(%s %p)\n", token_list, debugstr_mshtml_guid(riid), ppv); @@ -7408,7 +7406,7 @@ static HRESULT WINAPI token_list_QueryInterface(IWineDOMTokenList *iface, REFIID static ULONG WINAPI token_list_AddRef(IWineDOMTokenList *iface) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); - LONG ref = InterlockedIncrement(&token_list->ref); + LONG ref = dispex_ref_incr(&token_list->dispex); TRACE("(%p) ref=%ld\n", token_list, ref); @@ -7418,13 +7416,10 @@ static ULONG WINAPI token_list_AddRef(IWineDOMTokenList *iface) static ULONG WINAPI token_list_Release(IWineDOMTokenList *iface) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); - LONG ref = InterlockedDecrement(&token_list->ref); + LONG ref = dispex_ref_decr(&token_list->dispex); TRACE("(%p) ref=%ld\n", token_list, ref); - if(!ref) - release_dispex(&token_list->dispex); - return ref; } @@ -7742,6 +7737,13 @@ static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface) return CONTAINING_RECORD(iface, struct token_list, dispex); } +static void token_list_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + struct token_list *token_list = token_list_from_DispatchEx(dispex); + if(token_list->element) + note_cc_edge((nsISupports*)token_list->element, "element", cb); +} + static void token_list_unlink(DispatchEx *dispex) { struct token_list *token_list = token_list_from_DispatchEx(dispex); @@ -7830,6 +7832,7 @@ static HRESULT token_list_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD static const dispex_static_data_vtbl_t token_list_dispex_vtbl = { .destructor = token_list_destructor, + .traverse = token_list_traverse, .unlink = token_list_unlink, .value = token_list_value, .get_dispid = token_list_get_dispid, @@ -7860,7 +7863,6 @@ static HRESULT create_token_list(compat_mode_t compat_mode, IHTMLElement *elemen } obj->IWineDOMTokenList_iface.lpVtbl = &WineDOMTokenListVtbl; - obj->ref = 1; init_dispatch(&obj->dispex, (IUnknown*)&obj->IWineDOMTokenList_iface, &token_list_dispex, compat_mode); IHTMLElement_AddRef(element); obj->element = element;
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLRect.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: e7d5c06b7a66f5e78c6e3a25693b6fcf78de5e96 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e7d5c06b7a66f5e78c6e3a25693b6f…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for HTMLRect. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index eaed629c932..e99c5813609 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -529,8 +529,6 @@ typedef struct { IHTMLRect IHTMLRect_iface; IHTMLRect2 IHTMLRect2_iface; - LONG ref; - nsIDOMClientRect *nsrect; } HTMLRect; @@ -551,7 +549,7 @@ static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, voi *ppv = &This->IHTMLRect_iface; }else if (IsEqualGUID(&IID_IHTMLRect2, riid)) { *ppv = &This->IHTMLRect2_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { FIXME("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); @@ -566,7 +564,7 @@ static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, voi static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface) { HTMLRect *This = impl_from_IHTMLRect(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -576,13 +574,10 @@ static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface) static ULONG WINAPI HTMLRect_Release(IHTMLRect *iface) { HTMLRect *This = impl_from_IHTMLRect(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -840,6 +835,13 @@ static inline HTMLRect *HTMLRect_from_DispatchEx(DispatchEx *iface) return CONTAINING_RECORD(iface, HTMLRect, dispex); } +static void HTMLRect_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLRect *This = HTMLRect_from_DispatchEx(dispex); + if(This->nsrect) + note_cc_edge((nsISupports*)This->nsrect, "nsrect", cb); +} + static void HTMLRect_unlink(DispatchEx *dispex) { HTMLRect *This = HTMLRect_from_DispatchEx(dispex); @@ -860,6 +862,7 @@ void HTMLRect_init_dispex_info(dispex_data_t *info, compat_mode_t mode) static const dispex_static_data_vtbl_t HTMLRect_dispex_vtbl = { .destructor = HTMLRect_destructor, + .traverse = HTMLRect_traverse, .unlink = HTMLRect_unlink }; @@ -885,7 +888,6 @@ static HRESULT create_html_rect(nsIDOMClientRect *nsrect, compat_mode_t compat_m rect->IHTMLRect_iface.lpVtbl = &HTMLRectVtbl; rect->IHTMLRect2_iface.lpVtbl = &HTMLRect2Vtbl; - rect->ref = 1; init_dispatch(&rect->dispex, (IUnknown*)&rect->IHTMLRect_iface, &HTMLRect_dispex, compat_mode);
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLRectCollection.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 06b08c4080023359968c2e3738ce91ea71da5102 URL:
https://gitlab.winehq.org/wine/wine/-/commit/06b08c4080023359968c2e3738ce91…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:48 2023 +0300 mshtml: Implement Cycle Collection for HTMLRectCollection. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index b557630a51a..eaed629c932 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -900,8 +900,6 @@ typedef struct { DispatchEx dispex; IHTMLRectCollection IHTMLRectCollection_iface; - LONG ref; - nsIDOMClientRectList *rect_list; } HTMLRectCollection; @@ -1053,7 +1051,7 @@ static HRESULT WINAPI HTMLRectCollection_QueryInterface(IHTMLRectCollection *ifa *ppv = &This->IHTMLRectCollection_iface; }else if(IsEqualGUID(&IID_IHTMLRectCollection, riid)) { *ppv = &This->IHTMLRectCollection_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { FIXME("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); @@ -1068,7 +1066,7 @@ static HRESULT WINAPI HTMLRectCollection_QueryInterface(IHTMLRectCollection *ifa static ULONG WINAPI HTMLRectCollection_AddRef(IHTMLRectCollection *iface) { HTMLRectCollection *This = impl_from_IHTMLRectCollection(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -1078,13 +1076,10 @@ static ULONG WINAPI HTMLRectCollection_AddRef(IHTMLRectCollection *iface) static ULONG WINAPI HTMLRectCollection_Release(IHTMLRectCollection *iface) { HTMLRectCollection *This = impl_from_IHTMLRectCollection(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -1206,6 +1201,13 @@ static inline HTMLRectCollection *HTMLRectCollection_from_DispatchEx(DispatchEx return CONTAINING_RECORD(iface, HTMLRectCollection, dispex); } +static void HTMLRectCollection_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLRectCollection *This = HTMLRectCollection_from_DispatchEx(dispex); + if(This->rect_list) + note_cc_edge((nsISupports*)This->rect_list, "rect_list", cb); +} + static void HTMLRectCollection_unlink(DispatchEx *dispex) { HTMLRectCollection *This = HTMLRectCollection_from_DispatchEx(dispex); @@ -1294,6 +1296,7 @@ static HRESULT HTMLRectCollection_invoke(DispatchEx *dispex, DISPID id, LCID lci static const dispex_static_data_vtbl_t HTMLRectCollection_dispex_vtbl = { .destructor = HTMLRectCollection_destructor, + .traverse = HTMLRectCollection_traverse, .unlink = HTMLRectCollection_unlink, .get_dispid = HTMLRectCollection_get_dispid, .get_name = HTMLRectCollection_get_name, @@ -3323,7 +3326,6 @@ static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRec } rects->IHTMLRectCollection_iface.lpVtbl = &HTMLRectCollectionVtbl; - rects->ref = 1; rects->rect_list = rect_list; init_dispatch(&rects->dispex, (IUnknown*)&rects->IHTMLRectCollection_iface, &HTMLRectCollection_dispex, dispex_compat_mode(&This->node.event_target.dispex));
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLElementCollection.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: a1f91539aa32d4d1227b747d65d44bf48aa076e0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a1f91539aa32d4d1227b747d65d44b…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:47 2023 +0300 mshtml: Implement Cycle Collection for HTMLElementCollection. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelemcol.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index a9e489d2ca6..51c498cb9e9 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -37,8 +37,6 @@ typedef struct { HTMLElement **elems; DWORD len; - - LONG ref; } HTMLElementCollection; typedef struct { @@ -223,7 +221,7 @@ static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollectio *ppv = &This->IHTMLElementCollection_iface; }else if(IsEqualGUID(&IID_IHTMLElementCollection, riid)) { *ppv = &This->IHTMLElementCollection_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { *ppv = NULL; @@ -238,7 +236,7 @@ static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollectio static ULONG WINAPI HTMLElementCollection_AddRef(IHTMLElementCollection *iface) { HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -248,13 +246,10 @@ static ULONG WINAPI HTMLElementCollection_AddRef(IHTMLElementCollection *iface) static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface) { HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -542,6 +537,15 @@ static inline HTMLElementCollection *impl_from_DispatchEx(DispatchEx *iface) return CONTAINING_RECORD(iface, HTMLElementCollection, dispex); } +static void HTMLElementCollection_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLElementCollection *This = impl_from_DispatchEx(dispex); + unsigned i; + + for(i = 0; i < This->len; i++) + note_cc_edge((nsISupports*)&This->elems[i]->node.IHTMLDOMNode_iface, "elem", cb); +} + static void HTMLElementCollection_unlink(DispatchEx *dispex) { HTMLElementCollection *This = impl_from_DispatchEx(dispex); @@ -634,6 +638,7 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { .destructor = HTMLElementCollection_destructor, + .traverse = HTMLElementCollection_traverse, .unlink = HTMLElementCollection_unlink, .get_dispid = HTMLElementCollection_get_dispid, .get_name = HTMLElementCollection_get_name, @@ -864,7 +869,6 @@ static IHTMLElementCollection *HTMLElementCollection_Create(HTMLElement **elems, return NULL; ret->IHTMLElementCollection_iface.lpVtbl = &HTMLElementCollectionVtbl; - ret->ref = 1; ret->elems = elems; ret->len = len;
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement Cycle Collection for HTMLDOMChildrenCollection.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: bd16542cf4babb5f2f6c3d1242da6aaf8bd2b10b URL:
https://gitlab.winehq.org/wine/wine/-/commit/bd16542cf4babb5f2f6c3d1242da6a…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:47 2023 +0300 mshtml: Implement Cycle Collection for HTMLDOMChildrenCollection. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlnode.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 893a1a738f7..b7cd30c8c74 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -39,8 +39,6 @@ typedef struct { DispatchEx dispex; IHTMLDOMChildrenCollection IHTMLDOMChildrenCollection_iface; - LONG ref; - nsIDOMNodeList *nslist; } HTMLDOMChildrenCollection; @@ -208,7 +206,7 @@ static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface(IHTMLDOMChildrenC *ppv = &This->IHTMLDOMChildrenCollection_iface; }else if(IsEqualGUID(&IID_IHTMLDOMChildrenCollection, riid)) { *ppv = &This->IHTMLDOMChildrenCollection_iface; - }else if(dispex_query_interface_no_cc(&This->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { *ppv = NULL; @@ -223,7 +221,7 @@ static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface(IHTMLDOMChildrenC static ULONG WINAPI HTMLDOMChildrenCollection_AddRef(IHTMLDOMChildrenCollection *iface) { HTMLDOMChildrenCollection *This = impl_from_IHTMLDOMChildrenCollection(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = dispex_ref_incr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); @@ -233,13 +231,10 @@ static ULONG WINAPI HTMLDOMChildrenCollection_AddRef(IHTMLDOMChildrenCollection static ULONG WINAPI HTMLDOMChildrenCollection_Release(IHTMLDOMChildrenCollection *iface) { HTMLDOMChildrenCollection *This = impl_from_IHTMLDOMChildrenCollection(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->dispex); TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) - release_dispex(&This->dispex); - return ref; } @@ -360,6 +355,13 @@ static inline HTMLDOMChildrenCollection *impl_from_DispatchEx(DispatchEx *iface) return CONTAINING_RECORD(iface, HTMLDOMChildrenCollection, dispex); } +static void HTMLDOMChildrenCollection_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLDOMChildrenCollection *This = impl_from_DispatchEx(dispex); + if(This->nslist) + note_cc_edge((nsISupports*)This->nslist, "nslist", cb); +} + static void HTMLDOMChildrenCollection_unlink(DispatchEx *dispex) { HTMLDOMChildrenCollection *This = impl_from_DispatchEx(dispex); @@ -442,6 +444,7 @@ static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, L static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl = { .destructor = HTMLDOMChildrenCollection_destructor, + .traverse = HTMLDOMChildrenCollection_traverse, .unlink = HTMLDOMChildrenCollection_unlink, .get_dispid = HTMLDOMChildrenCollection_get_dispid, .get_name = HTMLDOMChildrenCollection_get_name, @@ -469,7 +472,6 @@ HRESULT create_child_collection(nsIDOMNodeList *nslist, compat_mode_t compat_mod return E_OUTOFMEMORY; collection->IHTMLDOMChildrenCollection_iface.lpVtbl = &HTMLDOMChildrenCollectionVtbl; - collection->ref = 1; nsIDOMNodeList_AddRef(nslist); collection->nslist = nslist;
1
0
0
0
Gabriel Ivăncescu : mshtml: Use actual name when traversing variant.
by Alexandre Julliard
22 Aug '23
22 Aug '23
Module: wine Branch: master Commit: 3b9269905ea408c94726588c60749135b8c0615d URL:
https://gitlab.winehq.org/wine/wine/-/commit/3b9269905ea408c94726588c607491…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 22 16:21:47 2023 +0300 mshtml: Use actual name when traversing variant. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/mshtml_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 54c1e2cc338..5d117d70e29 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1505,7 +1505,7 @@ static inline void unlink_variant(VARIANT *v) static inline void traverse_variant(VARIANT *v, const char *name, nsCycleCollectionTraversalCallback *cb) { if(V_VT(v) == VT_DISPATCH || V_VT(v) == VT_UNKNOWN) - note_cc_edge((nsISupports*)V_UNKNOWN(v), "dispex_data", cb); + note_cc_edge((nsISupports*)V_UNKNOWN(v), name, cb); } #ifdef __i386__
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200