Closed Bug 355291 Opened 18 years ago Closed 18 years ago

Recently Closed Tabs > Open All In Tabs throws exceptions when Always Display Tab Bar is enabled.

Categories

(Firefox :: Session Restore, defect)

2.0 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 2

People

(Reporter: stevee, Assigned: zeniko)

Details

(Keywords: regression, verified1.8.1.1)

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1) Gecko/20061003 BonEcho/2.0 ID:2006100303

From onemen @ http://forums.mozillazine.org/viewtopic.php?p=2521916#2521916

1. New profile, start firefox.
2. Tools > Options > Tabs, tick 'Always show the tab bar'
3. Open some tabs (middle click on some links in the BBC News RSS feed)
4. Close all tabs using the [x] icon on the tab until only one empty tab is left
5. History > Recently Closed Tabs > Open All In Tabs

Expected:
All the tabs that you closed (that are listed in History > Recently Closed Tabs) should be reopened

Actual:
Only one tab is restored. The rest have exceptions thrown:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMXULElement.boxObject]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/tabbrowser.xml :: _notifyBackgroundTab :: line 2867"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMXULElement.boxObject]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/browser.xml :: get_docShell :: line 0"  data: no]
Flags: blocking1.8.1.1?
WFM on Trunk.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/2006100204 Minefield/3.0a1
WORKSFORME on the branch as well.

onemen: Does this also happen with Tab Mix Plus disabled (resp. in safe mode with no extensions enabled at all)?
on new profile and in safe-mode too.

only change the pref: Tools > Options > Tabs, tick 'Always show the tab bar
or set browser.tabs.autoHide to false

i only see the error messages if i try History > Recently Closed Tabs > Open All In Tabs

when i have only one tab open and the tab is blank
Alright, this is a regression from bug 343895 which is caused by the fact that the check for whether we can discard the empty tab always returns true because |undoCloseTab| is called the second time before the first tab has been completely restored.
Keywords: regression
This patch should fix the issue.

Note that to reproduce the issue, it's crucial that only one absolutely blank tab is opened (and the tab bar shown and more than one tab in the RCT submenu).
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #241656 - Flags: review?(mano)
simon, just add check if the tab is busy or not, if the tab is busy its not a blank tab
Onemen: Thanks for the suggestion. Does this fix the issue for you?
(In reply to comment #7)
> Created an attachment (id=241657) [edit]
> fix as suggested by onemen (untested)
> 
> Onemen: Thanks for the suggestion. Does this fix the issue for you?
> 

yes.
it fix it for me :)
Attachment #241657 - Flags: review?(mano)
Comment on attachment 241657 [details] [diff] [review]
fix as suggested by onemen (untested)

r=mano
Attachment #241657 - Flags: review?(mano) → review+
Attachment #241656 - Attachment is obsolete: true
Attachment #241656 - Flags: review?(mano) → review-
Whiteboard: [checkin needed]
Comment on attachment 241657 [details] [diff] [review]
fix as suggested by onemen (untested)

Drivers: Simple fix to an edge-case issue where reopening several closed tabs at once fails if only one empty tab is open and the tab bar is visible.
Attachment #241657 - Flags: approval1.8.1.1?
mozilla/browser/base/content/browser.js 	1.719
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Comment on attachment 241657 [details] [diff] [review]
fix as suggested by onemen (untested)

approved for 1.8 branch, a=dveditz for drivers
Attachment #241657 - Flags: approval1.8.1.1? → approval1.8.1.1+
not really a blocker, but we're approving the patch if you get it landed in time.
Flags: blocking1.8.1.1? → blocking1.8.1.1-
Whiteboard: [checkin needed (1.8 branch)]
mozilla/browser/base/content/browser.js 	1.479.2.209
Keywords: fixed1.8.1.1
Whiteboard: [checkin needed (1.8 branch)]
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → Firefox 2
QA/testing: See comment #0 for steps to reproduce.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.1) Gecko/20061206 BonEcho/2.0.0.1 ID:2006120603
WFM
--> VERIFIED
Status: RESOLVED → VERIFIED
Component: History → Session Restore
QA Contact: history → session.restore
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: