diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 05:25:56 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 05:25:56 +0000 |
commit | 94f4c841ea562f94e4b71ea2694c6853b2f07a80 (patch) | |
tree | 327a3f0303d03fa50503c2828cdde328478d30c9 /webkit/plugins/npapi | |
parent | 0bacc8c4976c48b1bcd97a452f5b5fffe244e7ec (diff) | |
download | chromium_src-94f4c841ea562f94e4b71ea2694c6853b2f07a80.zip chromium_src-94f4c841ea562f94e4b71ea2694c6853b2f07a80.tar.gz chromium_src-94f4c841ea562f94e4b71ea2694c6853b2f07a80.tar.bz2 |
Always delete your pointers! Note that RUNNING_UNDER_VALGRIND may not be
true for other memory leak-check technologies such as heapcheck/pprof!
BUG=NONE
TEST=PluginLibLoading.UnloadAllPlugins (on Linux)
TBR=bauerb@chromium.org
Review URL: http://codereview.chromium.org/6155005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi')
-rw-r--r-- | webkit/plugins/npapi/plugin_list.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc index 6c4049a..31a4cd6 100644 --- a/webkit/plugins/npapi/plugin_list.cc +++ b/webkit/plugins/npapi/plugin_list.cc @@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/lazy_instance.h" #include "base/logging.h" +#include "base/stl_util-inl.h" #include "base/string_split.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" @@ -20,11 +21,6 @@ #include "webkit/plugins/npapi/plugin_lib.h" #include "webkit/plugins/plugin_switches.h" -#if defined(OS_POSIX) -#include "base/stl_util-inl.h" -#include "base/third_party/valgrind/valgrind.h" -#endif // defined(OS_POSIX) - namespace webkit { namespace npapi { @@ -793,18 +789,8 @@ PluginList::~PluginList() { } void PluginList::Shutdown() { - // TODO - // Note: plugin_groups_ contains simple pointers of type PluginGroup*, but - // since this singleton lives until the process is destroyed, no explicit - // cleanup is necessary. - // However, when running on Valgrind, we need to do the cleanup to keep the - // memory tree green. -#if defined(OS_POSIX) - if (RUNNING_ON_VALGRIND) { - STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), - plugin_groups_.end()); - } -#endif + STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), + plugin_groups_.end()); } } // namespace npapi |