From 6b0fb003dc32f5b84307448ad8e64a896a3fa2e4 Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Tue, 22 Oct 2013 00:21:20 +0200 Subject: [PATCH] Bug 929097 - Check window type in SessionStore.onOpen() to ignore; r=smacleod --- browser/components/sessionstore/src/SessionStore.jsm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/browser/components/sessionstore/src/SessionStore.jsm b/browser/components/sessionstore/src/SessionStore.jsm index eef6d2e1d98..ec09cf0de6c 100644 --- a/browser/components/sessionstore/src/SessionStore.jsm +++ b/browser/components/sessionstore/src/SessionStore.jsm @@ -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;