364235 don't instantiate plugins for URLs with unknown schemes unless we also have a type specified

r+sr=bz


git-svn-id: svn://10.0.0.236/trunk@231539 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%gmx.at
2007-08-06 18:02:14 +00:00
parent ee27393adc
commit d86f2d454f

View File

@@ -314,6 +314,9 @@ IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType)
nsCAutoString ext;
GetExtensionFromURI(uri, ext);
if (ext.IsEmpty())
return PR_FALSE;
nsCOMPtr<nsIPluginHost> host(do_GetService("@mozilla.org/plugin/host;1"));
const char* typeFromExt;
if (host &&
@@ -1053,6 +1056,10 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
if (!CanHandleURI(aURI)) {
LOG(("OBJLC [%p]: can't handle URI\n", this));
if (aTypeHint.IsEmpty()) {
rv = NS_ERROR_NOT_AVAILABLE;
return NS_OK;
}
// E.g. mms://
mType = eType_Plugin;
if (aNotify)