Bug 564861 - NPN_IntFromIdentifier always returns INT_MIN when running in OOPP mode because of a backwards conditional check. Also, int identifiers of -1 don't work correctly when the parent first creates the identifier, because we were misusing a sentinel value. r=bent

This commit is contained in:
Benjamin Smedberg 2010-05-10 17:11:25 -04:00
parent 11fa580385
commit 19727cf3ac
2 changed files with 1 additions and 4 deletions

View File

@ -1850,7 +1850,7 @@ PluginModuleChild::NPN_IntFromIdentifier(NPIdentifier aIdentifier)
{
PLUGIN_LOG_DEBUG_FUNCTION;
if (static_cast<PluginIdentifierChild*>(aIdentifier)->IsString()) {
if (!static_cast<PluginIdentifierChild*>(aIdentifier)->IsString()) {
return static_cast<PluginIdentifierChildInt*>(aIdentifier)->ToInt();
}
return PR_INT32_MIN;

View File

@ -542,9 +542,6 @@ PluginModuleParent::GetIdentifierForNPIdentifier(NPIdentifier aIdentifier)
}
else {
intval = mozilla::plugins::parent::_intfromidentifier(aIdentifier);
if (intval == -1) {
return nsnull;
}
string.SetIsVoid(PR_TRUE);
}
ident = new PluginIdentifierParent(aIdentifier);