On Tue Oct 10 13:24:26 2023 +0000, Gabriel Ivăncescu wrote:
OK so let me try another perspective. What do you think about the fourth patch? Obviously, if nothing is holding the inner windows while they're detached, then it should be good to go right? I mean, right now I know that some things can still hold the inner window, mostly because we still pass it to external callers instead of the outer window. But after that's fixed, do you think the fourth patch would be acceptable, then? Tbh I'd want it mainly because I'm interested to see if anything still holds inner window (it shouldn't, in theory). Otherwise, none of that behavior is tested and would be hard to debug if something relies on it. So for now I think I should just drop the 3rd and 4th patch and resend fourth after I have all external callers obtain the outer window. Is that fine? Who knows maybe we find out then that the 3rd is needed after all.
When inner window will be truly internal, then some of those NULL checks may be indeed removed. Note however, that some of them are less than obvious. Navigation may happen in a middle of some other function, possibly with Gecko code involved.