mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Fix some .getFromTypeAndExtension to follow the api documentation. Bug 274339,
r=biesi,mconnor, sr=neil
This commit is contained in:
parent
842ff87d68
commit
af33195dac
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user