Commit e2048063 authored by vmpstr's avatar vmpstr Committed by Commit bot

cc: Cancel RenewTreePriorirty callback if LTHI is gone.

This patch fixes a crash in which the smoothness notifier triggers
a RenewTreePriority call after LTHI disappears. In that case,
we cancel the callback when the LTHI is gone.

R=reveman, brianderson
BUG=411211

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

Cr-Commit-Position: refs/heads/master@{#293835}
parent 595b5cf6
...@@ -1263,6 +1263,12 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { ...@@ -1263,6 +1263,12 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
impl().scheduler.reset(); impl().scheduler.reset();
impl().layer_tree_host_impl.reset(); impl().layer_tree_host_impl.reset();
impl().weak_factory.InvalidateWeakPtrs(); 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();
impl().contents_texture_manager = NULL; impl().contents_texture_manager = NULL;
completion->Signal(); completion->Signal();
} }
......
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