Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index f5496f846f50cf32d90450e0243e45943488b30d..14e218194e026d57cf300dd7a41a58ac21cb5b8b 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -1217,12 +1217,10 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { |
impl().scheduler = nullptr; |
impl().layer_tree_host_impl = nullptr; |
impl().weak_factory.InvalidateWeakPtrs(); |
- // We need to explicitly cancel the notifier, since it isn't using weak ptrs. |
- // TODO(vmpstr): We should see if we can make it use weak ptrs and still keep |
- // the convention of having a weak ptr factory initialized last. Alternatively |
- // we should moved the notifier (and RenewTreePriority) to LTHI. See |
- // crbug.com/411972 |
- impl().smoothness_priority_expiration_notifier.Cancel(); |
+ // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
+ // holding while still on the compositor thread. This also ensures any |
+ // callbacks holding a ThreadProxy pointer are cancelled. |
+ impl().smoothness_priority_expiration_notifier.Shutdown(); |
impl().contents_texture_manager = NULL; |
completion->Signal(); |
} |