Bug 1577881 - Watch out for dead windows in getAllWindowDebuggees, r=ochameau.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Hackett 2019-09-10 19:11:15 +00:00
Родитель 092a5bfa5d
Коммит 5ac4e26c13
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -5,6 +5,7 @@
"use strict";
const xpcInspector = require("xpcInspector");
const { Cu } = require("chrome");
/**
* Manages pushing event loops and automatically pops and exits them in the
@ -131,7 +132,7 @@ EventLoop.prototype = {
})
// Ignore iframes as they will be paused automatically when pausing their
// owner top level document
.filter(window => window.top === window)
.filter(window => !Cu.isDeadWrapper(window) && window.top === window)
);
},