Bug 127700 timelineservice initialization isn't well wrapped

r=bzbarsky sr=sspitzer a=shaver
This commit is contained in:
timeless%mac.com 2002-02-28 07:51:38 +00:00
Родитель 9a7157b29e
Коммит b8019037a1
1 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -33,14 +33,19 @@ var gWindowManagerInterface;
var gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var gTimelineService = null;
var gTimelineEnabled = gPrefs.getBoolPref("mailnews.timeline_is_enabled");
try {
gTimelineService = Components.classes["@mozilla.org;timeline-service;1"].getService(Components.interfaces.nsITimelineService);
}
catch (ex)
{
gTimelineEnabled = false;
var gTimelineEnabled = ("@mozilla.org;timeline-service;1" in Components.classes);
if (gTimelineEnabled) {
try {
gTimelineEnabled = gPrefs.getBoolPref("mailnews.timeline_is_enabled");
if (gTimelineEnabled) {
gTimelineService =
Components.classes["@mozilla.org;timeline-service;1"].getService(Components.interfaces.nsITimelineService);
}
}
catch (ex)
{
gTimelineEnabled = false;
}
}
// Disable the new account menu item if the account preference is locked.