зеркало из https://github.com/mozilla/pjs.git
Bug #368506 --> nsIMsgAccountManager.defaultAccount can throw an exception if we don't have an account, catch that in MigrateJunkMailSettings so we don't pollute the console. sr=bienvenu
This commit is contained in:
Родитель
9983b9be9a
Коммит
f15a28053a
|
@ -891,14 +891,16 @@ function delayedOnLoadMessenger()
|
|||
#ifdef HAVE_SHELL_SERVICE
|
||||
var nsIShellService = Components.interfaces.nsIShellService;
|
||||
var shellService;
|
||||
var defaultAccount;
|
||||
try {
|
||||
shellService = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
defaultAccount = accountManager.defaultAccount;
|
||||
} catch (ex) {}
|
||||
|
||||
// show the default client dialog only if we have at least one account,
|
||||
// if we should check for the default client,
|
||||
// and we aren't already the default for all of our recognized types (mail, news, rss)
|
||||
if (shellService && accountManager.defaultAccount && shellService.shouldCheckDefaultClient
|
||||
if (shellService && defaultAccount && shellService.shouldCheckDefaultClient
|
||||
&& !shellService.isDefaultClient(true, nsIShellService.MAIL | nsIShellService.NEWS | nsIShellService.RSS))
|
||||
window.openDialog("chrome://messenger/content/defaultClientDialog.xul", "DefaultClient",
|
||||
"modal,centerscreen,chrome,resizable=no");
|
||||
|
@ -1769,7 +1771,10 @@ function MigrateJunkMailSettings()
|
|||
{
|
||||
// get the default account, check to see if we have values for our
|
||||
// globally migrated prefs.
|
||||
var defaultAccount = accountManager.defaultAccount;
|
||||
var defaultAccount;
|
||||
try {
|
||||
defaultAccount = accountManager.defaultAccount;
|
||||
} catch (ex) {}
|
||||
if (defaultAccount && defaultAccount.incomingServer)
|
||||
{
|
||||
// we only care about
|
||||
|
|
Загрузка…
Ссылка в новой задаче