Chromium Code Reviews| Index: content/renderer/pepper/plugin_object.cc |
| =================================================================== |
| --- content/renderer/pepper/plugin_object.cc (revision 275839) |
| +++ content/renderer/pepper/plugin_object.cc (working copy) |
| @@ -43,10 +43,11 @@ |
| 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; |
|
brettw
2014/06/16 19:36:50
Sorry I don't have in my head how this is supposed
Lei Zhang
2014/06/16 20:37:30
I'm not deleting it when FromNPObject() fails. I'm
|
| } |
| void WrapperClass_Invalidate(NPObject* object) {} |