Bug358121 --> nsIMsgMailNewsUrl.folder can throw a JS exception when opening .eml files. This causes things like the phishing detector to not work. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2006-10-26 04:14:09 +00:00
Родитель 529159dff8
Коммит fb1a877d2e
2 изменённых файлов: 15 добавлений и 3 удалений

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

@ -2539,7 +2539,13 @@ function OnMsgLoaded(aUrl)
if (!aUrl)
return;
var folder = aUrl.folder;
// nsIMsgMailNewsUrl.folder throws an error when opening .eml files.
var folder;
try {
folder = aUrl.folder;
}
catch (ex) {}
var msgURI = GetLoadedMessage();
var msgHdr = null;

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

@ -57,8 +57,14 @@ function isMsgEmailScam(aUrl)
return isEmailScam;
// Ignore nntp and RSS messages
var folder = aUrl.folder;
if (folder.server.type == 'nntp' || folder.server.type == 'rss')
// nsIMsgMailNewsUrl.folder can throw an error, especially if we are opening
// a .eml message.
var folder;
try {
folder = aUrl.folder;
} catch (ex) {}
if (folder && (folder.server.type == 'nntp' || folder.server.type == 'rss'))
return isEmailScam;
// loop through all of the link nodes in the message's DOM, looking for phishing URLs...