Backed out changeset 65ff5356cdfa (bug 1373271) for leaking a window in browser_1234021.js a=backout

MozReview-Commit-ID: LZT4Q7ixilz
This commit is contained in:
Wes Kocher 2017-06-19 17:47:00 -07:00
Родитель 8ead7e47d1
Коммит 97ce4573b9
2 изменённых файлов: 0 добавлений и 33 удалений

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

@ -5643,16 +5643,6 @@
return;
let browser = event.originalTarget;
// Preloaded browsers do not actually have any tabs. If one crashes,
// it should be released and removed.
if (browser === this._preloadedBrowser) {
// Calling _getPreloadedBrowser is necessary to actually consume the preloaded browser
let preloaded = this._getPreloadedBrowser();
preloaded.remove();
return;
}
let icon = browser.mIconURL;
let tab = this.getTabForBrowser(browser);

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

@ -219,26 +219,3 @@ add_task(async function test_background_crash_multiple() {
});
});
});
// Tests that crashed preloaded tabs are removed and no unexpected errors are
// thrown.
add_task(async function test_preload_crash() {
if (!Services.prefs.getBoolPref("browser.newtab.preload")) {
return;
}
// Since new tab is only crashable for the activity-stream version,
// we need to flip the pref
await SpecialPowers.pushPrefEnv({
set: [[ "browser.newtabpage.activity-stream.enabled", true ]]
});
// Release any existing preloaded browser
gBrowser._getPreloadedBrowser();
// Create a fresh preloaded browser
gBrowser._createPreloadBrowser();
await BrowserTestUtils.crashBrowser(gBrowser._preloadedBrowser, false);
Assert.ok(!gBrowser._preloadedBrowser);
});