From 93414abc3d993df9a3a772421c49dfa0d16df885 Mon Sep 17 00:00:00 2001 From: "pan.deng@intel.com" Date: Wed, 20 Jun 2012 03:24:28 +0000 Subject: If we show a replacement plug-in when the real one is not initialized correctly, we should release the origin WebPluginImpl object, otherwise memory leak will happen. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10536192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143138 0039d316-1c4b-4281-b951-d872f2087c98 --- AUTHORS | 1 + webkit/plugins/npapi/webplugin_impl.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index f4124bc..7cc1b12 100644 --- a/AUTHORS +++ b/AUTHORS @@ -163,6 +163,7 @@ Eriq Augustine Francois Kritzinger Erik Hill Mao Yujie +Pan Deng Aaron Leventhal Peter Collingbourne Aaron Randolph diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc index 27ae1c3..7511370 100644 --- a/webkit/plugins/npapi/webplugin_impl.cc +++ b/webkit/plugins/npapi/webplugin_impl.cc @@ -275,6 +275,7 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) { return false; container->setPlugin(replacement_plugin); + destroy(); return true; } -- cgit v1.1