> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090426 Shredder/3.0b3pre
When no account/no folder was selected at folder pane,
Changed from initial "All Folders" mode to other mode, Unread/Favorite/Recent,
Or returned to "All Folders")
File/New/Saved Search produced following exception.
> Error: folder is undefined
> Source File: chrome://messenger/content/folderPane.js Line: 1463
> (This exception occurs upon each "File/New/Saved Search")
Avobe exception didn't occur if account or folder is selected at folder pane.
Error: folder is undefined Source File: chrome://messenger/content/folderPane.js Line: 1463
Wada is this a regression ?
> Wada is this a regression ?
Sorry but I don't know. I happened to see the problem, and the problem was reproduced by very simple operation I stated in comment #0.
This is still happening in TB12.
What should happen in this case? Just catch the exception and do nothing? Or show some prompt?
I can do the clean exiting from the function. But if we want any UI stuff...
What about a status bar message? Is there something already available? There must be other cases where we want to tell "No folder selected" so I could reuse that?
I'd suggest if no folder is selected, fall back to the default account root, and show the dialog.
Good idea. Patch coming.
Created attachment 583921 [details] [diff] [review]
Comment on attachment 583921 [details] [diff] [review]
Since the UI isn't really changing, I don't think you need a ui-review from me.
So I'll give it a regular review instead. ;)
The code looks pretty good. The change is small and simple. r=me.
Well, very similar problem happens when using Folders->Favorite, when there are none to show, the left tree pane is empty. Restarting TB comes up with the msgAccountCentral.js pane showing about every action available, because it does not know which account is selected (none is). Clicking most of the commands throws an exception like
Error: window.parent.MsgJunkMail is not a function
Source File: chrome://messenger/content/msgAccountCentral.js
Is this filed somewhere?
Actually, that one bug is expected, that Junk feature is not ready, but was unintentionally exposed in the situation I described.
The real errors are
"Error: GetSelectedMsgFolder() is null"
Off to bug 713277.
Checked in: http://hg.mozilla.org/comm-central/rev/e657c5051b99