mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 673674 - Fennec freezes when viewing a non .txt file from disk. Mime handler was returning a valid type when it clearly didn't know. r=blassey
This commit is contained in:
parent
6a28121ce1
commit
769d560e77
@ -112,6 +112,10 @@ nsMIMEInfoAndroid::GetMimeInfoForFileExt(const nsACString& aFileExt,
|
||||
mozilla::AndroidBridge::Bridge()->
|
||||
GetMimeTypeFromExtensions(aFileExt, mimeType);
|
||||
|
||||
// "*/*" means that the bridge didn't know.
|
||||
if (mimeType.Equals(nsDependentCString("*/*"), nsCaseInsensitiveCStringComparator()))
|
||||
return false;
|
||||
|
||||
PRBool found = GetMimeInfoForMimeType(mimeType, aMimeInfo);
|
||||
(*aMimeInfo)->SetPrimaryExtension(aFileExt);
|
||||
return found;
|
||||
@ -384,8 +388,8 @@ nsMIMEInfoAndroid::GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers)
|
||||
NS_IMETHODIMP
|
||||
nsMIMEInfoAndroid::LaunchWithFile(nsIFile *aFile)
|
||||
{
|
||||
nsIURI* uri;
|
||||
NS_NewFileURI(&uri, aFile);
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_NewFileURI(getter_AddRefs(uri), aFile);
|
||||
LoadUriInternal(uri);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user