This happens because undoCloseTab tries to access gBrowser.tabs.length. Fix 1: move the undo close tab <key> from browser-sets.inc to browser.xul Fix 2: add a gBrowser null check inside undoCloseTab() Fix 1 seems to make more sense semantically, but that would leave the <key> as the only <key> inside browser.xul rather than browser-sets.inc. Pick one, please.
FWIW, the patch in bug 594217 currently contains a fix for this.
(In reply to comment #1) > FWIW, the patch in bug 594217 currently contains a fix for this. I'm well aware, but that keyboard shortcut is controversial and may never make it into the browser.
See bug 594217 comment 6.
Created attachment 486225 [details] [diff] [review] part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in)
part 2 will cover the remainder of the menu bar items that either cause errors or should be disabled for non-browser.xul windows and when no browser.xul window is open.
requesting blocking, since enabled menu bar items like 'Tab Groups' shouldn't do nothing when clicked while a browser window is not focused (either because another window, e.g. error console, is or because no windows are open).
Blocking+ for seemingly broken UI.
Notes from the Grand Retriage: candidate for branch fix - not ff4-blocking
Comment on attachment 486225 [details] [diff] [review] part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in) Pushed part 1. http://hg.mozilla.org/mozilla-central/rev/053d35d7eced