зеркало из https://github.com/mozilla/pjs.git
Fixin bug 15210 -- using more specific call CreatePluginInstance
instead of CreateInstance, r=idk@eng.sun.com
This commit is contained in:
Родитель
d2d904d64a
Коммит
f44a7d620c
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче