зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1697800 - webrtcUI.getActiveStreams should not throw during tab closing, r=johannh.
Depends on D108011 Differential Revision: https://phabricator.services.mozilla.com/D108012
This commit is contained in:
Родитель
fcd8134690
Коммит
2674c6abe4
|
@ -176,10 +176,10 @@ var webrtcUI = {
|
|||
window: state.window,
|
||||
};
|
||||
let browser = aStream.topBrowsingContext.embedderElement;
|
||||
let browserWindow = browser.ownerGlobal;
|
||||
let tab =
|
||||
browserWindow.gBrowser &&
|
||||
browserWindow.gBrowser.getTabForBrowser(browser);
|
||||
// browser can be null when we are in the process of closing a tab
|
||||
// and our stream list hasn't been updated yet.
|
||||
// gBrowser will be null if a stream is used outside a tabbrowser window.
|
||||
let tab = browser?.ownerGlobal.gBrowser?.getTabForBrowser(browser);
|
||||
return {
|
||||
uri: state.documentURI,
|
||||
tab,
|
||||
|
|
Загрузка…
Ссылка в новой задаче