Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 | 223 |
| 224 if (run_loop) { | 224 if (run_loop) { |
| 225 #if defined(OS_MACOSX) | 225 #if defined(OS_MACOSX) |
| 226 if (pool) | 226 if (pool) |
| 227 pool->Recycle(); | 227 pool->Recycle(); |
| 228 #endif | 228 #endif |
| 229 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 229 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 230 base::MessageLoop::current()->Run(); | 230 base::MessageLoop::current()->Run(); |
| 231 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 231 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 232 } | 232 } |
| 233 | |
| 234 // Since the destructors of the pending tasks can touch Blink objects, | |
| 235 // we need to make sure that all pending tasks are deleted before | |
| 236 // shutting down Blink (Blink is shut down in the RenderProcessImpl's | |
| 237 // destructor). | |
| 238 main_message_loop.DeletePendingTasks(); | |
|
jamesr
2014/09/22 14:38:04
since you're deleting *all* pending tasks and not
haraken
2014/09/22 15:54:18
I'm not familiar with a message loop, but what's a
| |
| 233 } | 239 } |
| 234 platform.PlatformUninitialize(); | 240 platform.PlatformUninitialize(); |
| 235 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 241 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
| 236 return 0; | 242 return 0; |
| 237 } | 243 } |
| 238 | 244 |
| 239 } // namespace content | 245 } // namespace content |
| OLD | NEW |