17 Aug
2023
17 Aug
'23
7:05 p.m.
Jacek Caban (@jacek) commented about dlls/mshtml/xmlhttprequest.c:
static ULONG WINAPI HTMLXMLHttpRequest_Release(IHTMLXMLHttpRequest *iface) { HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface); - LONG ref = InterlockedDecrement(&This->ref); + LONG ref = dispex_ref_decr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
+ /* The Cycle Collector might delay the unlink or destruction after ref reaches 0, + but we don't want a task to possibly grab ref to us and send events anymore. */ If we reach 0 ref count, it means that we're already unlinked, so where do those events come from?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3597#note_42641