diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 21:02:58 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 21:02:58 +0000 |
commit | 79dc62e3412845f97c91db5792d0049783e4c7c3 (patch) | |
tree | 567c2b2cba1c881a7cbcf1eb0103c944ea409ff2 /chrome/browser/renderer_host/render_process_host.cc | |
parent | f5cdaff1456dfd7a5ad2240115285010a32f7fc1 (diff) | |
download | chromium_src-79dc62e3412845f97c91db5792d0049783e4c7c3.zip chromium_src-79dc62e3412845f97c91db5792d0049783e4c7c3.tar.gz chromium_src-79dc62e3412845f97c91db5792d0049783e4c7c3.tar.bz2 |
Fix memory leaks when a renderer crashes and the user refreshes. Also fix memory leak every time a renderer process goes away.
Review URL: http://codereview.chromium.org/115492
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_process_host.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.cc b/chrome/browser/renderer_host/render_process_host.cc index e70596743..349f8e2 100644 --- a/chrome/browser/renderer_host/render_process_host.cc +++ b/chrome/browser/renderer_host/render_process_host.cc @@ -90,10 +90,8 @@ void RenderProcessHost::Release(int listener_id) { NotificationService::current()->Notify( NotificationType::RENDERER_PROCESS_TERMINATED, Source<RenderProcessHost>(this), NotificationService::NoDetails()); - if (pid_ >= 0) { + if (pid_ >= 0) all_hosts.Remove(pid_); - pid_ = -1; - } MessageLoop::current()->DeleteSoon(FROM_HERE, this); } } |