Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index b9cdb4fd1d90d7e623ee3776461da8684b104798..bc64398dc3657889fda88908cc44b7f2c8fa3e5e 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -976,6 +976,7 @@ |
#if defined(OS_ANDROID) |
g_browser_main_loop_shutting_down = true; |
+ ui::ContextProviderFactory::SetInstance(nullptr); |
#endif |
if (RenderProcessHost::run_renderer_in_process()) |
@@ -1130,14 +1131,8 @@ |
// it. |
{ |
TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUChannelFactory"); |
- if (BrowserGpuChannelHostFactory::instance()) { |
-#if defined(OS_ANDROID) |
- // Clean up the references to the factory before terminating it. |
- ui::ContextProviderFactory::SetInstance(nullptr); |
- ContextProviderFactoryImpl::Terminate(); |
-#endif |
+ if (BrowserGpuChannelHostFactory::instance()) |
BrowserGpuChannelHostFactory::Terminate(); |
- } |
} |
// Must happen after the I/O thread is shutdown since this class lives on the |
@@ -1218,8 +1213,6 @@ |
established_gpu_channel = false; |
always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); |
BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
- ContextProviderFactoryImpl::Initialize( |
- BrowserGpuChannelHostFactory::instance()); |
ui::ContextProviderFactory::SetInstance( |
ContextProviderFactoryImpl::GetInstance()); |
#elif defined(USE_AURA) || defined(OS_MACOSX) |