diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 22:35:26 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 22:35:26 +0000 |
commit | a6ed943ee5fd6d4b09618f9154da2e715e9b053c (patch) | |
tree | acac6c6a9478d00b3592497f4f3ae7c63802d919 /chrome/browser/browser_shutdown.cc | |
parent | 30eb751d1a778b73e20c238ec2f54b7293eb1b6f (diff) | |
download | chromium_src-a6ed943ee5fd6d4b09618f9154da2e715e9b053c.zip chromium_src-a6ed943ee5fd6d4b09618f9154da2e715e9b053c.tar.gz chromium_src-a6ed943ee5fd6d4b09618f9154da2e715e9b053c.tar.bz2 |
Adds some debugging code in hopes of tracking down a
crash. Specifically:
. Adds a CHECK to IDMap that evaluates to true if adding NULL. The
default isn't to do this check.
. browser_shutdown CHECKs if the # RPHs changes while iterating
through the RPHs.
BUG=15615
TEST=none
Review URL: http://codereview.chromium.org/150181
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 8ef0dbe..b67542d 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -65,6 +65,7 @@ void OnShutdownStarting(ShutdownType type) { // a no-op in some cases, so we still need to go through the normal // shutdown path for the ones that didn't exit here. shutdown_num_processes_slow_ = 0; + size_t start_rph_size = RenderProcessHost::size(); for (RenderProcessHost::iterator hosts = RenderProcessHost::begin(); hosts != RenderProcessHost::end(); ++hosts) { @@ -74,6 +75,9 @@ void OnShutdownStarting(ShutdownType type) { // higher up, it's not possible to get here. Confirm this and change // FastShutdownIfPossible to just be FastShutdown. shutdown_num_processes_slow_++; + // The number of RPHs should not have changed as the result of invoking + // FastShutdownIfPossible. + CHECK(start_rph_size == RenderProcessHost::size()); } } } |