mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 645289: Correctly calculate whether or not a given plugin has running instances. r=bsmedberg
This commit is contained in:
parent
4a49af189c
commit
b925f0cf5f
@ -455,13 +455,17 @@ nsPluginHost::GetInst()
|
||||
|
||||
PRBool nsPluginHost::IsRunningPlugin(nsPluginTag * plugin)
|
||||
{
|
||||
if (!plugin)
|
||||
if (!plugin || !plugin->mEntryPoint) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
for (int i = 0; i < plugin->mVariants; i++) {
|
||||
nsNPAPIPluginInstance *instance = FindInstance(plugin->mMimeTypeArray[i]);
|
||||
if (instance && instance->IsRunning())
|
||||
for (PRUint32 i = 0; i < mInstances.Length(); i++) {
|
||||
nsNPAPIPluginInstance *instance = mInstances[i].get();
|
||||
if (instance &&
|
||||
instance->GetPlugin() == plugin->mEntryPoint &&
|
||||
instance->IsRunning()) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user