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

r=biesi,mconnor, sr=neil


git-svn-id: svn://10.0.0.236/trunk@167901 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2005-01-17 19:13:15 +00:00
parent f75ec91997
commit e43812bfd1
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;
}