Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: chrome/browser/metrics/thread_watcher.cc

Issue 7744015: Increased the unresponsive threshold from 6 to 12 in beta (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher.cc
===================================================================
--- chrome/browser/metrics/thread_watcher.cc (revision 97408)
+++ chrome/browser/metrics/thread_watcher.cc (working copy)
@@ -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 @@
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()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698