Index: cc/trees/proxy_impl.cc |
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc |
index fcefcec65949a92523e80eb9f064e82785e724cf..659ff5c9ab13a2c1fea5c57a61b620943f47858e 100644 |
--- a/cc/trees/proxy_impl.cc |
+++ b/cc/trees/proxy_impl.cc |
@@ -90,11 +90,12 @@ ProxyImpl::~ProxyImpl() { |
DCHECK(IsImplThread()); |
DCHECK(IsMainThreadBlocked()); |
+ // Prevent the scheduler from performing actions while we're in an |
+ // inconsistent state. |
+ scheduler_->Stop(); |
// Take away the CompositorFrameSink before destroying things so it doesn't |
// try to call into its client mid-shutdown. |
- scheduler_->DidLoseCompositorFrameSink(); |
layer_tree_host_impl_->ReleaseCompositorFrameSink(); |
- |
scheduler_ = nullptr; |
layer_tree_host_impl_ = nullptr; |
// We need to explicitly shutdown the notifier to destroy any weakptrs it is |