Cleanup global "browsing context event map" when a browsing context gets closed
Categories
(Remote Protocol :: WebDriver BiDi, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webdriver:backlog])
When browsing contexts are getting closed with events registered, we might have to clean-up some internal state and distribute that across content processes.
Comment 1•3 years ago
|
||
Note that when a BrowsingContext closes, the corresponding JS Window Actor pair is destroyed, which destroys all MessageHandler, which destroys all modules. Normally we already remove log.entryAdded listeners via https://searchfox.org/mozilla-central/rev/13378066961f195595822d4f543c8ac5b7f46490/remote/webdriver-bidi/modules/windowglobal/log.jsm#26-31
Or maybe you have something else/more specific in mind?
(otherwise there is an issue when a session end and we destroy a Root MessageHandler, but that's Bug 1730913)
Reporter | ||
Comment 2•3 years ago
|
||
Nothing specific here. It's just a place-holder for whatever could come up.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
This bug is actually about cleaning up the global subscription state for a closed top-level browsing context. Right now it's not clear from the spec if this should be done or not when a browsingContext.contextDestroyed
event is handled. If we won't do it then outdated event subscriptions will remain in the global subscription map.
James, is that an issue with the spec and we should define it there?
Comment 4•3 years ago
|
||
It's a leak in the spec, but I don't think it's observable (you can't end up reusing the same state for another context), so you can either regard it as a bug in the spec, or as unnecessary to specify because it doesn't affect any requirements on implementations.
Reporter | ||
Comment 5•3 years ago
|
||
I filed https://github.com/w3c/webdriver-bidi/issues/166 for this particular question.
As long as we do not support event subscriptions for individual browsing contexts (bug 1723102) we won't have to do anything here.
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Updated•1 year ago
|
Description
•