From a509be7921be4bb20ccc8d7f9f92a7e58ee348c3 Mon Sep 17 00:00:00 2001 From: "dietrich%mozilla.com" Date: Thu, 24 Aug 2006 17:58:28 +0000 Subject: [PATCH] Reverting the fix for bug 343871 due to regressions. git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@208308 18797224-902f-48f8-a5cc-f745e15eee43 --- .../sessionstore/src/nsSessionStore.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mozilla/browser/components/sessionstore/src/nsSessionStore.js b/mozilla/browser/components/sessionstore/src/nsSessionStore.js index 2cb190b50ff..7cc73c06612 100644 --- a/mozilla/browser/components/sessionstore/src/nsSessionStore.js +++ b/mozilla/browser/components/sessionstore/src/nsSessionStore.js @@ -387,9 +387,8 @@ SessionStoreService.prototype = { onLoad: function sss_onLoad(aWindow) { var _this = this; - // ignore non-browser windows and windows opened while shutting down - if (aWindow.document.documentElement.getAttribute("windowtype") != "navigator:browser" || - this._loadState == STATE_QUITTING) + // ignore non-browser windows + if (aWindow.document.documentElement.getAttribute("windowtype") != "navigator:browser") return; // assign it a unique identifier (timestamp) @@ -442,8 +441,7 @@ SessionStoreService.prototype = { * Window reference */ onClose: function sss_onClose(aWindow) { - // ignore windows not tracked by SessionStore - if (!aWindow.__SSi || !this._windows[aWindow.__SSi]) { + if (aWindow.document.documentElement.getAttribute("windowtype") != "navigator:browser") { return; } @@ -1183,17 +1181,12 @@ SessionStoreService.prototype = { return; } - var winData; // open new windows for all further window entries of a multi-window session - // (unless they don't contain any tab data) for (var w = 1; w < root.windows.length; w++) { - winData = root.windows[w]; - if (winData && winData.tabs && winData.tabs[0]) { - this._openWindowWithState({ windows: [winData], opener: aWindow }); - } + this._openWindowWithState({ windows: [root.windows[w]], opener: aWindow }); } - winData = root.windows[0]; + var winData = root.windows[0]; if (!winData.tabs) { winData.tabs = []; }