diff options
author | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 22:06:20 +0000 |
---|---|---|
committer | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 22:06:20 +0000 |
commit | 9b4e643469f80cd6b186ebb0f03b6c135c0d5478 (patch) | |
tree | cb28e140b0ece496f08d7f2613b21a18e75f6b9e | |
parent | 891217cb1efc819782cfd161155aa26bca1098d1 (diff) | |
download | chromium_src-9b4e643469f80cd6b186ebb0f03b6c135c0d5478.zip chromium_src-9b4e643469f80cd6b186ebb0f03b6c135c0d5478.tar.gz chromium_src-9b4e643469f80cd6b186ebb0f03b6c135c0d5478.tar.bz2 |
ThreadWatcher - generate a crash if atleast one thread is
responding and if the number of other threads responding
is less than or equal to live_threads_threshold_.
R=jar
TEST=browser unit tests
Review URL: https://chromiumcodereview.appspot.com/10543088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141523 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/metrics/thread_watcher.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index 8698907..d2b6253 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -374,8 +374,11 @@ void ThreadWatcher::GotNoResponse() { unresponsive_count_histogram_->Add(unresponding_thread_count); // Crash the browser if the watched thread is to be crashed on hang and if the - // number of other threads responding is equal to live_threads_threshold_. - if (crash_on_hang_ && responding_thread_count <= live_threads_threshold_) { + // number of other threads responding is less than or equal to + // live_threads_threshold_ and at least one other thread is responding. + if (crash_on_hang_ && + responding_thread_count > 0 && + responding_thread_count <= live_threads_threshold_) { static bool crashed_once = false; if (!crashed_once) { crashed_once = true; |