Closed Bug 684773 Opened 13 years ago Closed 13 years ago

Unpin all tabs earlier when restoring a session in overwriting mode

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 9

People

(Reporter: tabutils+bugzilla, Assigned: tabutils+bugzilla)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20100101 Firefox/6.0.1
Build ID: 20110830092941

Steps to reproduce:

http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#2603

2604     // make sure that the selected tab won't be closed in order to
2605     // prevent unnecessary flickering
2606     if (aOverwriteTabs && tabbrowser.selectedTab._tPos >= newTabCount)
2607       tabbrowser.moveTabTo(tabbrowser.selectedTab, newTabCount - 1);
2608 
2609     // unpin all tabs to ensure they are not reordered in the next loop
2610     if (aOverwriteTabs) {
2611       for (let t = tabbrowser._numPinnedTabs - 1; t > -1; t--)
2612         tabbrowser.unpinTab(tabbrowser.tabs[t]);
2613     }




Expected results:

These two paragraphs need to be swapped, because the former moveTabTo cannot move an unpinned tab before a pinned tab, thus the purpose to prevent unnecessary flickering is missed.
OS: Windows XP → All
Hardware: x86 → All
Attached patch patchSplinter Review
Attachment #560709 - Flags: review?(dietrich)
Assignee: nobody → ithinc
Comment on attachment 560709 [details] [diff] [review]
patch

hah, nice catch. r=me, assuming you've run the test suite or have try results showing no regressions from this.
Attachment #560709 - Flags: review?(dietrich) → review+
Keywords: checkin-needed
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Didn't apply cleanly to inbound tip, but have fixed locally to save a back and forth. Now in my queue with a few other bits that are being sent to try first and then onto inbound.

To save time for future patches, could you set your hgrc to include the author automatically & also add a commit message, along the lines of:
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed

Thanks :-)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/154c98ef3947
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: