On Wed Nov 1 16:30:20 2023 +0000, Jacek Caban wrote:
I guess we will indeed need to keep refs from inner windows to outer
windows after all, but I'll leave that aside for a follow-up MR, so for now they're todo_wine. There are other ways to support that, without keeping refs from inner windows. I find it hard to justify spending time on it if it's just for sake of this test, so let's leave it aside, please.
It might be needed for other things as well. For example according to some tests, it's needed for document.parentWindow (as well as these tests ofc, well rather their behavior).
One possible solution would be to hold refs to the outer window instead (from these objects). But does that really make things better? It's still a cyclic ref to the outer window in such case.
Note that currently the outer_window field in HTMLDocumentNode is broken. It doesn't hold a ref. So it can potentially crash and access invalid memory in very niche cases. It probably doesn't matter much in practice but I don't like it. We can't just detach it btw, as some existing tests will fail if we do that, as well as future get_parentWindow test.
Anyway we will see later, I still have another MR to send up first with some cyclic refs and a leak fix.