summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_child_process_host_impl.cc
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 04:25:26 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 04:25:26 +0000
commit5998d9d3faae4448ab4883a06ec70e1c9efb8053 (patch)
tree2cadae91ea56a754a6b7b9a8b3d174d36238cdff /content/browser/browser_child_process_host_impl.cc
parent30fcc38967acd1240ff9f0275787cca4e4349415 (diff)
downloadchromium_src-5998d9d3faae4448ab4883a06ec70e1c9efb8053.zip
chromium_src-5998d9d3faae4448ab4883a06ec70e1c9efb8053.tar.gz
chromium_src-5998d9d3faae4448ab4883a06ec70e1c9efb8053.tar.bz2
Delete HostDelegate objects instead of HostImpl objects to avoid leaking the former.
BUG=116744 Review URL: http://codereview.chromium.org/9553003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_child_process_host_impl.cc')
-rw-r--r--content/browser/browser_child_process_host_impl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 75a49ee..b2c231d 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -105,7 +105,10 @@ void BrowserChildProcessHostImpl::TerminateAll() {
// Make a copy since the BrowserChildProcessHost dtor mutates the original
// list.
BrowserChildProcessList copy = g_child_process_list.Get();
- STLDeleteElements(&copy);
+ for (BrowserChildProcessList::iterator it = copy.begin();
+ it != copy.end(); ++it) {
+ delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl.
+ }
}
void BrowserChildProcessHostImpl::Launch(