Commit 168f3dcc authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[renderer]: Fix RendererScheduler shutdown logic to ensure it is shutdown before the MessageLoop.

The RendererScheduler needs to be shutdown before the MessageLoop. Previously
this was the case as blink was shutdown before the message loop, however now
the message loop is shutdown first. This CL ensures that the renderer
scheduler is shutdown just before the message loop.

BUG=467369

Review URL: https://codereview.chromium.org/1014643002

Cr-Commit-Position: refs/heads/master@{#320908}
parent 373bf95a
...@@ -761,11 +761,12 @@ void RenderThreadImpl::Shutdown() { ...@@ -761,11 +761,12 @@ void RenderThreadImpl::Shutdown() {
NPChannelBase::CleanupChannels(); NPChannelBase::CleanupChannels();
#endif #endif
// Shut down the message loop before shutting down Blink. // Shut down the message loop and the renderer scheduler before shutting down
// This prevents a scenario where a pending task in the message loop accesses // Blink. This prevents a scenario where a pending task in the message loop
// Blink objects after Blink shuts down. // accesses Blink objects after Blink shuts down.
// This must be at the very end of the shutdown sequence. You must not touch // This must be at the very end of the shutdown sequence. You must not touch
// the message loop after this. // the message loop after this.
renderer_scheduler_->Shutdown();
main_message_loop_.reset(); main_message_loop_.reset();
if (blink_platform_impl_) if (blink_platform_impl_)
blink::shutdown(); blink::shutdown();
......
...@@ -85,9 +85,7 @@ void WebSchedulerImpl::postLoadingTask( ...@@ -85,9 +85,7 @@ void WebSchedulerImpl::postLoadingTask(
} }
void WebSchedulerImpl::shutdown() { void WebSchedulerImpl::shutdown() {
idle_task_runner_ = nullptr; // TODO(rmcilroy): Delete this method once the blink side is removed.
loading_task_runner_ = nullptr;
return renderer_scheduler_->Shutdown();
} }
} // namespace content } // namespace content
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment