Bug 929097 - Check window type in SessionStore.onOpen() to ignore; r=smacleod

This commit is contained in:
Tim Taubert 2013-10-22 00:21:20 +02:00
parent 4ee6063121
commit 6b0fb003dc

View File

@ -692,9 +692,8 @@ let SessionStoreInternal = {
if (aWindow && aWindow.__SSi && this._windows[aWindow.__SSi])
return;
// ignore non-browser windows and windows opened while shutting down
if (aWindow.document.documentElement.getAttribute("windowtype") != "navigator:browser" ||
this._loadState == STATE_QUITTING)
// ignore windows opened while shutting down
if (this._loadState == STATE_QUITTING)
return;
// Assign the window a unique identifier we can use to reference
@ -859,6 +858,13 @@ let SessionStoreInternal = {
let onload = () => {
aWindow.removeEventListener("load", onload);
let windowType = aWindow.document.documentElement.getAttribute("windowtype");
// Ignore non-browser windows.
if (windowType != "navigator:browser") {
return;
}
if (this._sessionInitialized) {
this.onLoad(aWindow);
return;