Fix some .getFromTypeAndExtension to follow the api documentation. Bug 274339,

r=biesi,mconnor, sr=neil


git-svn-id: svn://10.0.0.236/trunk@171131 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2005-03-23 21:39:39 +00:00
parent d3e09b6d55
commit e95d5a4fb9

View File

@ -721,10 +721,12 @@ function getMIMETypeForURI(aURI)
function getMIMEInfoForType(aMIMEType, aExtension)
{
try {
return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension);
}
catch (e) {
if (aMIMEType || aExtension) {
try {
return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension);
}
catch (e) {
}
}
return null;
}