Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index dbfb590ac48055aa7a05f0715b5bdd80d1f1e53a..142eb73c89af9c4a6e27b24110829f19c62c2426 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -108,6 +108,7 @@ |
#include "content/browser/compositor/browser_compositor_view_mac.h" |
#include "content/browser/in_process_io_surface_manager_mac.h" |
#include "content/browser/theme_helper_mac.h" |
+#include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
#endif |
#if defined(USE_OZONE) |
@@ -701,6 +702,13 @@ int BrowserMainLoop::PreCreateThreads() { |
} |
#endif |
+#if defined(OS_MACOSX) && !defined(OS_IOS) |
+ // The WindowResizeHelper allows the UI thread to wait on specific renderer |
+ // and GPU messages from the IO thread. Initializing it before the IO thread |
+ // starts ensures the affected IO thread messages always have somewhere to go. |
+ ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); |
+#endif |
+ |
// 1) Need to initialize in-process GpuDataManager before creating threads. |
// It's unsafe to append the gpu command line switches to the global |
// CommandLine::ForCurrentProcess object after threads are created. |