зеркало из https://github.com/mozilla/pjs.git
Fix incorrect type usage for NPP_SetValue NPNVprivateModeBool. b=544158 r=karlt
This commit is contained in:
Родитель
18d895a5d5
Коммит
a00524ee6d
|
@ -432,9 +432,7 @@ PluginInstanceChild::AnswerNPP_SetValue_NPNVprivateModeBool(const bool& value,
|
|||
return true;
|
||||
}
|
||||
|
||||
// Use `long` instead of NPBool because Flash and other plugins read
|
||||
// this as a word-size value instead of the 1-byte NPBool that it is.
|
||||
long v = value;
|
||||
NPBool v = value;
|
||||
*result = mPluginIface->setvalue(GetNPP(), NPNVprivateModeBool, &v);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1677,7 +1677,8 @@ nsNPAPIPluginInstance::PrivateModeStateChanged()
|
|||
return rv;
|
||||
|
||||
NPError error;
|
||||
NS_TRY_SAFE_CALL_RETURN(error, (*mCallbacks->setvalue)(&mNPP, NPNVprivateModeBool, &pme), mLibrary, this);
|
||||
NPBool value = static_cast<NPBool>(pme);
|
||||
NS_TRY_SAFE_CALL_RETURN(error, (*mCallbacks->setvalue)(&mNPP, NPNVprivateModeBool, &value), mLibrary, this);
|
||||
return (error == NPERR_NO_ERROR) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче