summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 23:54:54 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 23:54:54 +0000
commit062fdf144bc85acd70a5c135a91aaf108d9f0821 (patch)
treea06f63a1660a7a74aa330cdb12d4b7254d0a22b0 /chrome/browser
parenteef5337c72da6d28a00b45df020ac9054d58e5f2 (diff)
downloadchromium_src-062fdf144bc85acd70a5c135a91aaf108d9f0821.zip
chromium_src-062fdf144bc85acd70a5c135a91aaf108d9f0821.tar.gz
chromium_src-062fdf144bc85acd70a5c135a91aaf108d9f0821.tar.bz2
Fixes bug in about:memory that resulted in showing null for browser if
you had a crashed tab or phantom tab. BUG=none TEST=create two tabs, pin one, close it (so that it goes phantom), navigate to about:memory and make sure you don't see an entry for the phantom tab. Review URL: http://codereview.chromium.org/646035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/memory_details.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 1649fe5..227d629 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -93,7 +93,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
RenderProcessHost::AllHostsIterator()); !renderer_iter.IsAtEnd();
renderer_iter.Advance()) {
DCHECK(renderer_iter.GetCurrentValue());
- if (process.pid !=
+ // Ignore processes that don't have a connection, such as crashed tabs or
+ // phantom tabs.
+ if (!renderer_iter.GetCurrentValue()->HasConnection() || process.pid !=
base::GetProcId(renderer_iter.GetCurrentValue()->GetHandle())) {
continue;
}