Index: content/renderer/renderer_main.cc |
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc |
index e82712cf7e03d7a05c865e03966788b3bed95b8d..5ef677ae1eebd852377223ef28236aef2a34d366 100644 |
--- a/content/renderer/renderer_main.cc |
+++ b/content/renderer/renderer_main.cc |
@@ -148,12 +148,13 @@ int RendererMain(const MainFunctionParams& parameters) { |
// needs to be backed by a Foundation-level loop to process NSTimers. See |
// http://crbug.com/306348#c24 for details. |
scoped_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop()); |
- base::MessageLoop main_message_loop(pump.Pass()); |
+ scoped_ptr<base::MessageLoop> main_message_loop( |
+ new base::MessageLoop(pump.Pass())); |
#else |
// The main message loop of the renderer services doesn't have IO or UI tasks. |
- base::MessageLoop main_message_loop; |
+ scoped_ptr<base::MessageLoop> main_message_loop(new base::MessageLoop()); |
#endif |
- main_message_loop.AddTaskObserver(&task_observer); |
+ main_message_loop->AddTaskObserver(&task_observer); |
base::PlatformThread::SetName("CrRendererMain"); |
@@ -202,7 +203,7 @@ int RendererMain(const MainFunctionParams& parameters) { |
// TODO(markus): Check if it is OK to unconditionally move this |
// instruction down. |
RenderProcessImpl render_process; |
- new RenderThreadImpl(); |
+ new RenderThreadImpl(main_message_loop.Pass()); |
#endif |
bool run_loop = true; |
if (!no_sandbox) { |
@@ -218,7 +219,7 @@ int RendererMain(const MainFunctionParams& parameters) { |
} |
#if defined(OS_POSIX) && !defined(OS_MACOSX) |
RenderProcessImpl render_process; |
- new RenderThreadImpl(); |
+ new RenderThreadImpl(main_message_loop.Pass()); |
#endif |
base::HighResolutionTimerManager hi_res_timer_manager; |