Bug 1599037 - Fix RootActor.listRemoteFrames against non-browser windows. r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D54465

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2019-11-28 09:53:16 +00:00
Родитель 1958404d26
Коммит 5ce7bb5816
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -602,7 +602,7 @@ RootActor.prototype = {
const window = Services.wm.getMostRecentWindow(
DebuggerServer.chromeWindowType
);
if (window.docShell.browsingContext.id === id) {
if (window && window.docShell.browsingContext.id === id) {
return [
...window.document.querySelectorAll(`browser[remote="true"]`),
].map(browser => browser.browsingContext);