gh-13149: Fixed WS marking tabs as inactive in certain cases (gh-13298)

This commit is contained in:
mr. m
2026-04-17 13:32:22 +02:00
committed by GitHub
parent 3b85ac912e
commit 7046d16956
2 changed files with 26 additions and 4 deletions

View File

@@ -795,6 +795,16 @@ class nsZenWindowSync {
);
return false;
}
// Theoretical case where we are trying to swap two tabs in the same window.
// There has been some reports of this happening in the wild, and while it shouldn't
// cause any critical issues, it can cause some weird states and we should avoid it.
// For example, see gh-13149
if (aOtherTab.ownerGlobal === aOurTab.ownerGlobal) {
this.log(
`Cannot swap browsers between tabs ${aOurTab.id} and ${aOtherTab.id} because they are in the same window`
);
return false;
}
// Can't swap between chrome and content processes.
if (
aOurTab.linkedBrowser.isRemoteBrowser !=