Index: cc/trees/single_thread_proxy.cc |
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc |
index ba1938ae2f2e11a3e1b1c64f2ab0dffaa0e13098..6a053c261a992c81f758e32ada832e0743fe888b 100644 |
--- a/cc/trees/single_thread_proxy.cc |
+++ b/cc/trees/single_thread_proxy.cc |
@@ -358,6 +358,10 @@ void SingleThreadProxy::Stop() { |
DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); |
DebugScopedSetImplThread impl(task_runner_provider_); |
+ // Take away the OutputSurface before destroying things so it doesn't try |
+ // to call into its client mid-shutdown. |
+ layer_tree_host_impl_->ReleaseOutputSurface(); |
+ |
BlockingTaskRunner::CapturePostTasks blocked( |
task_runner_provider_->blocking_main_thread_task_runner()); |
scheduler_on_impl_thread_ = nullptr; |