summaryrefslogtreecommitdiffstats
path: root/chrome/browser/memory_details.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 20:48:39 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 20:48:39 +0000
commit6d53eb2ab02939d98002bbd9513cbf1d4c0e258c (patch)
tree01e3375e3147ad15f86b51ceef49e8805511ac7e /chrome/browser/memory_details.cc
parentd1f99ac961277eab1ef8d0478d1737fd0b57000d (diff)
downloadchromium_src-6d53eb2ab02939d98002bbd9513cbf1d4c0e258c.zip
chromium_src-6d53eb2ab02939d98002bbd9513cbf1d4c0e258c.tar.gz
chromium_src-6d53eb2ab02939d98002bbd9513cbf1d4c0e258c.tar.bz2
Fix a crash bug in memory_utils.cc caused by assuming that the
RenderViewHost's delegate is a WebContents. Review URL: http://codereview.chromium.org/23025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/memory_details.cc')
-rw-r--r--chrome/browser/memory_details.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index e1279fe..927b2eb 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -222,9 +222,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
continue;
RenderViewHost* host = static_cast<RenderViewHost*>(widget);
- TabContents* contents =
- static_cast<WebContents*>(host->delegate());
- DCHECK(contents);
+ TabContents* contents = NULL;
+ if (host->delegate())
+ contents = host->delegate()->GetAsWebContents();
if (!contents)
continue;
std::wstring title = contents->GetTitle();