-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What happens to the responsible browsing context of a settings object when the browsing context is discarded? #3846
Comments
I looked into this and waffled back and forth on the answer. Currently I'm leaning toward "yes", because if you save On the other hand it seems like the intent of discarding a browsing context is pretty clearly to allow freeing memory? And maybe this hurts that? Unclear to me how badly. |
Hmm, there may be a clue lower down.
(I vaguely remember you and me working through adding that in the past.) Right now I see a strong reference graph of WindowProxy -> Window -> environment settings object -> responsible browsing context, which "discard" does not sever, so the above statement seems false. Maybe if we severed the last link in "discard" it would become true. Edit: diagram of the current situation in #3863. |
Yeah, I agree. I wonder what UAs do in practice. I am pretty sure that Gecko severs the equivalent of the "environment settings object -> responsible browsing context" link and has null-checks as needed. |
Previously, a Document could sometimes "have no browsing context". Now, "a Document's browsing context" is either a browsing context or null. Previously, "a Window's browsing context" was not defined, despite being referenced extensively. Now, it is defined to be the Window's associated Document's browsing context. Related to #3846, #4363, and #4366.
Note that elsewhere we concluded that there should indeed be null checks on these browsing context getters throughout. #4363 tracks adding them. |
https://html.spec.whatwg.org/multipage/window-object.html#discard-a-document says:
Does this reference outlive the browsing context being discarded?
The text was updated successfully, but these errors were encountered: