diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-25 22:08:49 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-25 22:08:49 +0000 |
commit | cff2ac8e0b3d6769180c5f5e75508852be3904d1 (patch) | |
tree | c020a4231f078bbd1b34a235a5229179238bce38 /chrome/gpu | |
parent | 7f18fd362ebb903207ad9894e546687a3344efed (diff) | |
download | chromium_src-cff2ac8e0b3d6769180c5f5e75508852be3904d1.zip chromium_src-cff2ac8e0b3d6769180c5f5e75508852be3904d1.tar.gz chromium_src-cff2ac8e0b3d6769180c5f5e75508852be3904d1.tar.bz2 |
Renamed GpuWatchdogThread::OnExit to make it clear it is crashing deliberately.
It crashes rather than exiting normally so that the hang is reported as a crash and it is possible to see what the presumed hung thread was doing in order to diagnose whether or not there is a bug.
TEST=try
BUG=73871
Review URL: http://codereview.chromium.org/6576044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_watchdog_thread.cc | 10 | ||||
-rw-r--r-- | chrome/gpu/gpu_watchdog_thread.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/gpu/gpu_watchdog_thread.cc b/chrome/gpu/gpu_watchdog_thread.cc index 6d16b34..bb01097 100644 --- a/chrome/gpu/gpu_watchdog_thread.cc +++ b/chrome/gpu/gpu_watchdog_thread.cc @@ -118,7 +118,7 @@ void GpuWatchdogThread::OnAcknowledge() { if (!armed_) return; - // Revoke any pending OnExit. + // Revoke any pending hang termination. method_factory_->RevokeAll(); armed_ = false; @@ -188,12 +188,13 @@ void GpuWatchdogThread::OnCheck() { // not respond in time. message_loop()->PostDelayedTask( FROM_HERE, - method_factory_->NewRunnableMethod(&GpuWatchdogThread::OnExit), + method_factory_->NewRunnableMethod( + &GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang), timeout_); } // Use the --disable-gpu-watchdog command line switch to disable this. -void GpuWatchdogThread::OnExit() { +void GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang() { #if defined(OS_WIN) // Defer termination until a certain amount of CPU time has elapsed on the // watched thread. @@ -201,7 +202,8 @@ void GpuWatchdogThread::OnExit() { if (time_since_arm < timeout_) { message_loop()->PostDelayedTask( FROM_HERE, - method_factory_->NewRunnableMethod(&GpuWatchdogThread::OnExit), + method_factory_->NewRunnableMethod( + &GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang), timeout_ - time_since_arm); return; } diff --git a/chrome/gpu/gpu_watchdog_thread.h b/chrome/gpu/gpu_watchdog_thread.h index 925682b..2f80888 100644 --- a/chrome/gpu/gpu_watchdog_thread.h +++ b/chrome/gpu/gpu_watchdog_thread.h @@ -48,7 +48,7 @@ class GpuWatchdogThread : public base::Thread, void OnAcknowledge(); void OnCheck(); - void OnExit(); + void DeliberatelyCrashingToRecoverFromHang(); void Disable(); int64 GetWatchedThreadTime(); |