Bug 540776 - Initialize NPRuntime scriptable result variants the same way the Mozilla plugin host does, r=cjones

--HG--
extra : transplant_source : x_%F3W%2A%F5%83%C5%BE%08V%81%D7%40%BF%12%0B%BF%DF%A0
This commit is contained in:
Benjamin Smedberg 2010-01-19 22:23:32 -05:00
parent 8cf748e18c
commit 1b91ca0efa

View File

@ -697,6 +697,7 @@ PluginScriptableObjectChild::AnswerInvoke(const NPRemoteIdentifier& aId,
}
NPVariant result;
VOID_TO_NPVARIANT(result);
bool success = mObject->_class->invoke(mObject, (NPIdentifier)aId,
convertedArgs.Elements(), argCount,
&result);
@ -765,6 +766,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(const nsTArray<Variant>& aArgs,
}
NPVariant result;
VOID_TO_NPVARIANT(result);
bool success = mObject->_class->invokeDefault(mObject,
convertedArgs.Elements(),
argCount, &result);
@ -844,6 +846,7 @@ PluginScriptableObjectChild::AnswerGetProperty(const NPRemoteIdentifier& aId,
}
NPVariant result;
VOID_TO_NPVARIANT(result);
if (!mObject->_class->getProperty(mObject, (NPIdentifier)aId, &result)) {
*aResult = void_t();
*aSuccess = false;
@ -1001,6 +1004,7 @@ PluginScriptableObjectChild::AnswerConstruct(const nsTArray<Variant>& aArgs,
}
NPVariant result;
VOID_TO_NPVARIANT(result);
bool success = mObject->_class->construct(mObject, convertedArgs.Elements(),
argCount, &result);