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

r=biesi,mconnor, sr=neil
This commit is contained in:
bzbarsky%mit.edu 2005-01-17 19:13:15 +00:00
parent 842ff87d68
commit af33195dac
2 changed files with 12 additions and 8 deletions

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;
}

View File

@ -720,10 +720,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;
}