Fixed and errant return condition in SetupPluginInstance().
git-svn-id: svn://10.0.0.236/trunk@41895 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d19e4cebb8
commit
2ebe5df53c
@ -1860,17 +1860,18 @@ NS_IMETHODIMP nsPluginHostImpl::SetUpPluginInstance(const char *aMimeType,
|
||||
nsIPluginInstance::GetIID(),
|
||||
(void**)&instance);
|
||||
|
||||
|
||||
// couldn't create an XPCOM plugin, try to create wrapper for a legacy plugin
|
||||
if (NS_FAILED(result)) {
|
||||
if(GetPluginFactory(mimetype, &plugin) == NS_OK){
|
||||
result = GetPluginFactory(mimetype, &plugin);
|
||||
if(!NS_FAILED(result)){
|
||||
result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void **)&instance);
|
||||
NS_RELEASE(plugin);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// neither an XPCOM or legacy plugin could be instantiated, so return the failure
|
||||
if (NS_FAILED(result)) {
|
||||
if (NS_FAILED(result)){
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -1860,17 +1860,18 @@ NS_IMETHODIMP nsPluginHostImpl::SetUpPluginInstance(const char *aMimeType,
|
||||
nsIPluginInstance::GetIID(),
|
||||
(void**)&instance);
|
||||
|
||||
|
||||
// couldn't create an XPCOM plugin, try to create wrapper for a legacy plugin
|
||||
if (NS_FAILED(result)) {
|
||||
if(GetPluginFactory(mimetype, &plugin) == NS_OK){
|
||||
result = GetPluginFactory(mimetype, &plugin);
|
||||
if(!NS_FAILED(result)){
|
||||
result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void **)&instance);
|
||||
NS_RELEASE(plugin);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// neither an XPCOM or legacy plugin could be instantiated, so return the failure
|
||||
if (NS_FAILED(result)) {
|
||||
if (NS_FAILED(result)){
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user