Bug 1095717 - Bail out when creating the next preload browser in case the HostFrame was destroyed shortly before r=jaws

This commit is contained in:
Tim Taubert 2014-11-11 13:41:23 +01:00
parent cc728497a5
commit 7021ce2170

View File

@ -300,6 +300,12 @@ HiddenBrowser.prototype = {
this._applySize(); this._applySize();
doc.getElementById("win").appendChild(this._browser); doc.getElementById("win").appendChild(this._browser);
// The browser might not have a docShell here if the HostFrame was
// destroyed while the promise was resolved. Simply bail out.
if (!this._browser.docShell) {
return;
}
// Let the docShell be inactive so that document.hidden=true. // Let the docShell be inactive so that document.hidden=true.
this._browser.docShell.isActive = false; this._browser.docShell.isActive = false;