Bug 1501789 - Use the JSM global to create permanentKeys to avoid leaking windows after tab tear out / adoption. r=Felipe

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2018-10-28 01:53:14 +00:00
Родитель 7e335e61a5
Коммит 3269c2c585
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1815,7 +1815,10 @@ window._gBrowser = {
userContextId,
} = {}) {
let b = document.createXULElement("browser");
b.permanentKey = {};
// Use the JSM global to create the permanentKey, so that if the
// permanentKey is held by something after this window closes, it
// doesn't keep the window alive.
b.permanentKey = new (Cu.getGlobalForObject(Services).Object);
const defaultBrowserAttributes = {
contextmenu: "contentAreaContextMenu",

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

@ -25,7 +25,6 @@ run-if = debug || devedition || nightly_build # Requires startupRecorder.js, whi
[browser_tabclose.js]
skip-if = (os == 'win' && bits == 32) # Bug 1488537
[browser_tabdetach.js]
skip-if = debug # Bug 1501789
[browser_tabopen.js]
skip-if = (verify && (os == 'mac'))
[browser_tabopen_squeeze.js]