зеркало из https://github.com/mozilla/gecko-dev.git
Use a try / catch clause to avoid a JS error for some timeline code.
This commit is contained in:
Родитель
f5c506abfd
Коммит
101a7ee477
|
@ -31,9 +31,18 @@ var nsPrefBranch = null;
|
|||
var gOfflineManager;
|
||||
var gWindowManagerInterface;
|
||||
var gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
var gTimelineService = Components.classes["@mozilla.org;timeline-service;1"].getService(Components.interfaces.nsITimelineService);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// Disable the new account menu item if the account preference is locked.
|
||||
// Two other affected areas are the account central and the account manager
|
||||
// dialog.
|
||||
|
|
Загрузка…
Ссылка в новой задаче