summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics/thread_watcher.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 21:03:43 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 21:03:43 +0000
commit85339947ab2b4bb680838d65592d7f57937b62cf (patch)
tree9d6e58fd61e70878db4d554e5b668ebf67c38c9e /chrome/browser/metrics/thread_watcher.cc
parentb791d9ce7ddc0e2d48bae316fd7a4b474cd9dec3 (diff)
downloadchromium_src-85339947ab2b4bb680838d65592d7f57937b62cf.zip
chromium_src-85339947ab2b4bb680838d65592d7f57937b62cf.tar.gz
chromium_src-85339947ab2b4bb680838d65592d7f57937b62cf.tar.bz2
Increased the unresponsive_threshold from 6 to 12
in Beta channel and XP. We will crash the browser if UI/IO threads don't respond within 24 secs (instead of 12 secs) in Beta channel and Windows XP. BUG=90095 R=jar TEST=thread_watcher unit tests Review URL: http://codereview.chromium.org/7744015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics/thread_watcher.cc')
-rw-r--r--chrome/browser/metrics/thread_watcher.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 5c7103d..22c26f8 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -16,7 +16,7 @@
#include "content/common/notification_service.h"
#if defined(OS_WIN)
-#include <Objbase.h>
+#include "base/win/windows_version.h"
#endif
// static
@@ -417,6 +417,22 @@ void ThreadWatcherList::ParseCommandLine(
uint32* live_threads_threshold) {
// Determine |unresponsive_threshold| based on switches::kCrashOnHangSeconds.
*unresponsive_threshold = kUnresponsiveCount;
+
+ if (chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_BETA) {
+ // Increase the unresponsive_threshold in Beta channel to reduce the number
+ // of crashes due to ThreadWatcher.
+ *unresponsive_threshold *= 2;
+ } else {
+ // In Canary and Dev channels, for Windows XP (old systems), double the
+ // unresponsive_threshold to give OS a chance to schedule UI/IO threads a
+ // time slice to respond with a pong message (to get around limitations with
+ // the OS).
+#if defined(OS_WIN)
+ if (base::win::GetVersion() <= base::win::VERSION_XP)
+ *unresponsive_threshold *= 2;
+#endif
+ }
+
std::string crash_on_hang_seconds =
command_line.GetSwitchValueASCII(switches::kCrashOnHangSeconds);
if (!crash_on_hang_seconds.empty()) {