| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index faed5fc5c27350c10c45ba7767c8ff593cf45967..80d34b3780a1dd352f188e746d3f94cbb1fa8c14 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -505,8 +505,6 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
| #endif
|
| BrowserGpuChannelHostFactory::Terminate();
|
|
|
| - GamepadService::GetInstance()->Terminate();
|
| -
|
| // The device monitors are using |system_monitor_| as dependency, so delete
|
| // them before |system_monitor_| goes away.
|
| // On Mac and windows, the monitor needs to be destroyed on the same thread
|
| @@ -606,6 +604,10 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
| // more head start for those operations to finish.
|
| BrowserThreadImpl::ShutdownThreadPool();
|
|
|
| + // Must happen after the I/O thread is shutdown since this class lives on the
|
| + // I/O thread and isn't threadsafe.
|
| + GamepadService::GetInstance()->Terminate();
|
| +
|
| if (parts_.get())
|
| parts_->PostDestroyThreads();
|
| }
|
|
|