Skip to content

Commit 91215a4

Browse files
committed
Backed out changeset e1a0d895f3a9 (bug 1863692) for causing failures in test_restore_manually.py
1 parent c46592b commit 91215a4

File tree

3 files changed

+9
-145
lines changed

3 files changed

+9
-145
lines changed

browser/components/sessionstore/SessionStore.sys.mjs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6560,16 +6560,20 @@ var SessionStoreInternal = {
65606560

65616561
hasPinnedTabs ||= !!newWindowState.tabs.length;
65626562

6563-
// Only transfer over window attributes for pinned tabs, which has
6564-
// already been extracted into newWindowState.tabs.
6565-
if (newWindowState.tabs.length) {
6563+
// At this point the window in the state object has been modified (or not)
6564+
// We want to build the rest of this new window object if we have pinnedTabs.
6565+
if (
6566+
newWindowState.tabs.length ||
6567+
(PERSIST_SESSIONS && newWindowState._closedTabs.length)
6568+
) {
6569+
// First get the other attributes off the window
65666570
WINDOW_ATTRIBUTES.forEach(function (attr) {
65676571
if (attr in window) {
65686572
newWindowState[attr] = window[attr];
65696573
delete window[attr];
65706574
}
65716575
});
6572-
// We're just copying position data into the window for pinned tabs.
6576+
// We're just copying position data into the pinned window.
65736577
// Not copying over:
65746578
// - extData
65756579
// - isPopup
@@ -6579,14 +6583,8 @@ var SessionStoreInternal = {
65796583
// remaining data
65806584
window.__lastSessionWindowID = newWindowState.__lastSessionWindowID =
65816585
"" + Date.now() + Math.random();
6582-
}
65836586

6584-
// If this newWindowState contains pinned tabs (stored in tabs) or
6585-
// closed tabs, add it to the defaultState so they're available immediately.
6586-
if (
6587-
newWindowState.tabs.length ||
6588-
(PERSIST_SESSIONS && newWindowState._closedTabs.length)
6589-
) {
6587+
// Actually add this window to our defaultState
65906588
defaultState.windows.push(newWindowState);
65916589
// Remove the window from the state if it doesn't have any tabs
65926590
if (!window.tabs.length) {

browser/components/sessionstore/test/marionette/manifest.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ tags = local
33

44
[test_persist_closed_tabs_restore_manually.py]
55
[test_restore_loading_tab.py]
6-
[test_restore_manually.py]
76
[test_restore_manually_with_pinned_tabs.py]
87
[test_restore_windows_after_restart_and_quit.py]
98
[test_restore_windows_after_windows_shutdown.py]

browser/components/sessionstore/test/marionette/test_restore_manually.py

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)