Use TabSwitched instead of TabSelect in the remote codebase
Categories
(Remote Protocol :: Marionette, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
From Bug 1749666:
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #0)
Since bug 1745267 has been landed for Firefox 97 there is the new event
TabSwitched
available on the tabbrowser. This is more reliable asTabSelect
which returns earlier - means before the tab switch actually happened.We should update browser.js to make use of it.
When trying to implement this, we faced race conditions on Windows platforms between focusWindow
and selectTab
at https://searchfox.org/mozilla-central/rev/ecd91b104714a8b2584a4c03175be50ccb3a7c67/remote/cdp/domains/parent/Target.jsm#125-126 (see https://phabricator.services.mozilla.com/D139060#4740379)
This race condition only happens when using the TabSwitched
event, so we decided to keep TabSelect
for the time being.
This bug is about investigating the race conditions linked to the TabSwitched
event and ultimately decide whether we should use it instead of TabSelect
or not.
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Description
•