On Mon Aug 28 13:16:27 2023 +0000, Jacek Caban wrote:
See Gecko sources for how it handles extra shouldDelete parameter.
So it does indeed look like it won't immediately free without the CC being shut down. However, I've been pondering some designs here, and I think the last_release one is over-engineered for our use cases; we only really need it for task_magic and only for two objects (the outer window doesn't use the dispex), so it seems like too much overhead and complexity for no reason.
Since we already have to introduce a new vtbl method, instead of having to deal with shouldDelete later or ccref_stabilize_for_deletion and so on (I also get rid of release_dispex btw), I figured a much simpler method is to just have something like get_task_magic.
I pushed new version using that. It's far simpler and still generic for every object, and avoids issues with gecko internals.
Well, except for outer window, because that one doesn't use the dispex and has its own mechanism, but that's the case anyway even with last_release.