Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: content/browser/browser_main_loop.cc

Issue 2299333003: Revert of Revert "Revert of content: Fix Context creation logic in ContextProviderFactoryImpl." (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698