Bug 1639997 - Have webrtcUI handle the case where the selectedTab is set to null. r=pbz

It's possible for gBrowser.selectedTab to be set to null. This should be a no-op, but this
part of webrtcUI that tabbrowser calls doesn't handle the case, and causes an exception to
be thrown. This patch allows the no-op case to occur properly.

Differential Revision: https://phabricator.services.mozilla.com/D76736
This commit is contained in:
Mike Conley 2020-05-26 18:01:04 +00:00
Родитель 490f3dcbdf
Коммит bf6bb6f1c4
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -660,6 +660,10 @@ var webrtcUI = {
},
shouldShowSharedTabWarning(tab) {
if (!tab || !tab.linkedBrowser) {
return false;
}
let browser = tab.linkedBrowser;
// We want the user to be able to switch to one tab after starting
// to share their window or screen. The presumption here is that