On Tue Mar 3 14:36:27 2026 +0000, Jacek Caban wrote:
No, the GC supplies the CC with edge info so the CC knows as well, it just doesn't supply it with a real "refcount" per object (since it doesn't have one anyway). Okay, that is what I expected (and I was confused by your earlier description). So, back to the main question: should we do the same? How tightly is it tied to Gecko's JS internals? I'm not sure it's gonna work. For one thing, we don't track roots. But the main problem is that this integrates with gecko's JS (and root tracing), which we don't even use but may actually be used by internal gecko mechanisms (like the chrome:// stuff), so how is it supposed to work?
Not to mention our objects are properly refcounted so it seems weird in the first place (because those are collected by the CC, unsure if they can even work on the GC). I also don't think gecko's approach is ideal, as in it probably has scenarios that will leak in one way or another with such mixing-up, but it's probably the best they could come up with given their constraints. (they state this in comments in several places) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10045#note_131140