Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index b652408781292dcabc393cb8919471f25ea4acb3..eebd91d00de7610a41e7b6ed7356ef04db952a0e 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -60,6 +60,7 @@ |
#include "content/browser/memory/memory_coordinator.h" |
#include "content/browser/net/browser_online_state_observer.h" |
#include "content/browser/renderer_host/media/media_stream_manager.h" |
+#include "content/browser/renderer_host/offscreen_canvas_surface_manager.h" |
#include "content/browser/renderer_host/render_process_host_impl.h" |
#include "content/browser/service_manager/service_manager_context.h" |
#include "content/browser/speech/speech_recognition_manager_impl.h" |
@@ -1060,6 +1061,11 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { |
device_monitor_mac_.reset(); |
#endif |
+ // Shutdown OffscreenCanvasSurfaceManager if it exists. |
+ // Because it contains weak pointers to IPC services, this is done before |
+ // Service Manager and IPC are shut down. |
+ OffscreenCanvasSurfaceManager::Terminate(); |
+ |
// Shutdown the Service Manager and IPC. |
service_manager_context_.reset(); |
mojo_ipc_support_.reset(); |