Fixin bug 15210 -- using more specific call CreatePluginInstance

instead of CreateInstance, r=idk@eng.sun.com
This commit is contained in:
av%netscape.com 2000-02-15 23:24:10 +00:00
Родитель d2d904d64a
Коммит f44a7d620c
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -1697,10 +1697,17 @@ NS_IMETHODIMP nsPluginHostImpl::SetUpPluginInstance(const char *aMimeType,
// couldn't create an XPCOM plugin, try to create wrapper for a legacy plugin
if (NS_FAILED(result)) {
result = GetPluginFactory(mimetype, &plugin);
if(!NS_FAILED(result)){
if(!NS_FAILED(result))
{
result = plugin->CreatePluginInstance(NULL, kIPluginInstanceIID,aMimeType, (void **)&instance);
if (NS_FAILED(result))
result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void**)&instance);
NS_RELEASE(plugin);
}
if (NS_FAILED(result)) {
NS_WITH_SERVICE(nsIPlugin, plugin, "component://netscape/blackwood/pluglet-engine",&result);
if (NS_SUCCEEDED(result)) {

Просмотреть файл

@ -1697,10 +1697,17 @@ NS_IMETHODIMP nsPluginHostImpl::SetUpPluginInstance(const char *aMimeType,
// couldn't create an XPCOM plugin, try to create wrapper for a legacy plugin
if (NS_FAILED(result)) {
result = GetPluginFactory(mimetype, &plugin);
if(!NS_FAILED(result)){
if(!NS_FAILED(result))
{
result = plugin->CreatePluginInstance(NULL, kIPluginInstanceIID,aMimeType, (void **)&instance);
if (NS_FAILED(result))
result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void**)&instance);
NS_RELEASE(plugin);
}
if (NS_FAILED(result)) {
NS_WITH_SERVICE(nsIPlugin, plugin, "component://netscape/blackwood/pluglet-engine",&result);
if (NS_SUCCEEDED(result)) {