| Index: content/gpu/gpu_watchdog_thread.cc
|
| diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc
|
| index 5f8f6197f6db178e34f1b162dfd6e0d32eaf0fc9..940d07e72ac43ae0cb6f36e1b160ab48c6bd7f24 100644
|
| --- a/content/gpu/gpu_watchdog_thread.cc
|
| +++ b/content/gpu/gpu_watchdog_thread.cc
|
| @@ -114,7 +114,9 @@
|
| CloseHandle(watched_thread_handle_);
|
| #endif
|
|
|
| - base::PowerMonitor::RemoveObserver(this);
|
| + base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
|
| + if (power_monitor)
|
| + power_monitor->RemoveObserver(this);
|
|
|
| #if defined(OS_CHROMEOS)
|
| if (tty_file_)
|
| @@ -264,7 +266,9 @@
|
| }
|
|
|
| void GpuWatchdogThread::OnAddPowerObserver() {
|
| - DCHECK(base::PowerMonitor::AddObserver(this));
|
| + base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
|
| + DCHECK(power_monitor);
|
| + power_monitor->AddObserver(this);
|
| }
|
|
|
| void GpuWatchdogThread::OnSuspend() {
|
|
|