Closed Bug 477657 Opened 15 years ago Closed 15 years ago

saner default handling for _closedTabs and sizemode

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.6a1

People

(Reporter: zeniko, Assigned: zeniko)

References

Details

Attachments

(1 file, 2 obsolete files)

If a session state containing window data without _closedTabs is passed to setBrowserState or setWindowState (or found in sessionstore.js), that window's _closedTabs list should be cleared.

Omitting a window's sizemode property should preserve the current state (and not restore to a non-maximized, non-minimized state).
Attached patch patch (without tests) (obsolete) — Splinter Review
We should also clear window values (set with setWindowValue) when overwriting a window's state with setWindowState. Tests follow as soon as I (or anybody else) find time for writing them.
Simon, part of this patch is no longer needed with bug 476463 landed...
Attached patch patch and tests (obsolete) — Splinter Review
This includes a test for the bits already checked in in bug 476463.
Assignee: nobody → zeniko
Attachment #361328 - Attachment is obsolete: true
Attachment #363420 - Flags: review?(dietrich)
Comment on attachment 363420 [details] [diff] [review]
patch and tests

looks fine, r=me
Attachment #363420 - Flags: review?(dietrich) → review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/6fa6667b903f
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.2a1
Attachment #363420 - Flags: approval1.9.1?
This test is failing on trunk right now:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1236027288.1236033209.11742.gz

TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_477657.js | the window was maximized - Got 3, expected 1

There's a chance that nobody noticed because of the recurring focus-related oranges until now.

I suggest we back this out.
backed out
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch fixed testSplinter Review
I was so focused on using executeSoon instead of setTimeout that I managed to miss the fact that we need a setTimeout here after all: to mirror the setTimeout in nsSessionStore.js's sss_restoreWindowFeatures.
Attachment #363420 - Attachment is obsolete: true
Attachment #363420 - Flags: approval1.9.1?
Keywords: checkin-needed
(In reply to comment #8)
> mirror the setTimeout in nsSessionStore.js's sss_restoreWindowFeatures.

Won't that be fragile?
(In reply to comment #9)
> Won't that be fragile?

As long as these timeouts are queued on the same thread, they'll always happen in the same order.
http://hg.mozilla.org/mozilla-central/rev/841e2745a834
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
This failed today.

on mac:
the window was explicitly unmaximized - Didn't expect 1, but got it

and windows:
the window was maximized - Got 3, expected 1
Depends on: 482975
Flags: in-testsuite+ → in-testsuite?
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: