void WrapperClass_Deallocate(NPObject* np_object) {
PluginObject* plugin_object = PluginObject::FromNPObject(np_object);
- if (!plugin_object)
- return;
- plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
- delete plugin_object;
+ if (plugin_object) {
+ plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
+ delete plugin_object;
+ }
+ delete np_object;
}
void WrapperClass_Invalidate(NPObject* object) {}
calloc(property_count, sizeof(NPIdentifier)));
*count = 0; // Will be the number of items successfully converted.
for (uint32_t i = 0; i < property_count; ++i) {
- if (!((*values)[i] = PPVarToNPIdentifier(properties[i]))) {
+ (*values)[i] = PPVarToNPIdentifier(properties[i]);
+ if (!(*values)[i]) {
// Throw an exception for the failed convertion.
*result_converter.exception() =
StringVar::StringToPPVar(kInvalidValueException);