зеркало из https://github.com/mozilla/pjs.git
Bug #358339 --> wrap attempts to get the shell service in try/catch calls. On some flavors of linux, the initializing the shell service throws an error because we don't have access to the gconf services we are expecting. sr=bienvenu
This commit is contained in:
Родитель
c031b21935
Коммит
7c8594c515
|
@ -888,12 +888,15 @@ function delayedOnLoadMessenger()
|
|||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
var nsIShellService = Components.interfaces.nsIShellService;
|
||||
var shellService = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
var shellService;
|
||||
try {
|
||||
shellService = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
} 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 (accountManager.defaultAccount && shellService.shouldCheckDefaultClient
|
||||
if (shellService && accountManager.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");
|
||||
|
|
|
@ -56,7 +56,11 @@ var gGeneralPane = {
|
|||
checkDefaultNow: function (aAppType)
|
||||
{
|
||||
var nsIShellService = Components.interfaces.nsIShellService;
|
||||
var shellSvc = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
var shellSvc;
|
||||
try {
|
||||
shellSvc = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
} catch (ex) { return; }
|
||||
|
||||
// if we are already the default for all the types we handle, then alert the user.
|
||||
if (shellSvc.isDefaultClient(false, nsIShellService.MAIL | nsIShellService.NEWS | nsIShellService.RSS))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче