Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 184bcc6121ffa5f80987507691e0facbb2ac4b44..8f4bf998ba35f3c0e1f4ef2270692e3c4b802ed6 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -757,11 +757,12 @@ void RenderThreadImpl::Shutdown() { |
NPChannelBase::CleanupChannels(); |
#endif |
- // Shut down the message loop before shutting down Blink. |
- // This prevents a scenario where a pending task in the message loop accesses |
- // Blink objects after Blink shuts down. |
+ // Shut down the message loop and the renderer scheduler before shutting down |
+ // Blink. This prevents a scenario where a pending task in the message loop |
+ // accesses Blink objects after Blink shuts down. |
// This must be at the very end of the shutdown sequence. You must not touch |
// the message loop after this. |
+ renderer_scheduler_->Shutdown(); |
main_message_loop_.reset(); |
if (blink_platform_impl_) |
blink::shutdown(); |