diff options
-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(); |