summaryrefslogtreecommitdiffstats
path: root/chrome/browser/memory_details.cc
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 00:59:27 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 00:59:27 +0000
commit4e6ffdeb72dead790b276ea580210c9f4584b277 (patch)
tree38c694d4b644929990b178a4ca93a4cbefb7231e /chrome/browser/memory_details.cc
parent8ba7fa577750fea29b7ed2bb8b65010fd0c2d17a (diff)
downloadchromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.zip
chromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.tar.gz
chromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.tar.bz2
Fix uninitialized constructors and reverse NULL checks found by Coverity
CID=15466,14666,14747,14334,13593,13507,7591 BUG=None TEST=None Review URL: http://codereview.chromium.org/6674007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/memory_details.cc')
-rw-r--r--chrome/browser/memory_details.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index ea5d35f..4510aa5 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -156,6 +156,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
const RenderViewHost* host = static_cast<const RenderViewHost*>(widget);
RenderViewHostDelegate* host_delegate = host->delegate();
+ DCHECK(host_delegate);
GURL url = host_delegate->GetURL();
ViewType::Type type = host_delegate->GetRenderViewType();
if (host->enabled_bindings() & BindingsPolicy::WEB_UI) {
@@ -168,9 +169,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
} else if (host->enabled_bindings() & BindingsPolicy::EXTENSION) {
process.renderer_type = ChildProcessInfo::RENDERER_EXTENSION;
}
- TabContents* contents = NULL;
- if (host_delegate)
- contents = host_delegate->GetAsTabContents();
+ TabContents* contents = host_delegate->GetAsTabContents();
if (!contents) {
if (host->is_extension_process()) {
const Extension* extension =