зеркало из https://github.com/mozilla/gecko-dev.git
Oops, missed two
This commit is contained in:
Родитель
e512cd4cd8
Коммит
6d1571567b
|
@ -847,10 +847,9 @@ PluginScriptableObjectChild::AnswerGetProperty(const NPRemoteIdentifier& aId,
|
|||
Variant* aResult,
|
||||
bool* aSuccess)
|
||||
{
|
||||
*aResult = null_t();
|
||||
|
||||
if (!mObject) {
|
||||
NS_WARNING("Calling AnswerGetProperty with an invalidated object!");
|
||||
*aResult = void_t();
|
||||
*aSuccess = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -858,12 +857,14 @@ PluginScriptableObjectChild::AnswerGetProperty(const NPRemoteIdentifier& aId,
|
|||
NS_ASSERTION(mObject->_class != GetClass(), "Bad object type!");
|
||||
|
||||
if (!(mObject->_class && mObject->_class->getProperty)) {
|
||||
*aResult = void_t();
|
||||
*aSuccess = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
NPVariant result;
|
||||
if (!mObject->_class->getProperty(mObject, (NPIdentifier)aId, &result)) {
|
||||
*aResult = void_t();
|
||||
*aSuccess = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -873,6 +874,10 @@ PluginScriptableObjectChild::AnswerGetProperty(const NPRemoteIdentifier& aId,
|
|||
PluginModuleChild::sBrowserFuncs.releasevariantvalue(&result);
|
||||
*aResult = converted;
|
||||
}
|
||||
else {
|
||||
*aResult = void_t();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1106,6 +1106,10 @@ PluginScriptableObjectParent::AnswerGetProperty(const NPRemoteIdentifier& aId,
|
|||
ReleaseVariant(result, instance);
|
||||
*aResult = converted;
|
||||
}
|
||||
else {
|
||||
*aResult = void_t();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче