mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
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:
parent
8cf748e18c
commit
1b91ca0efa
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user