Chromium Code Reviews
DescriptionFix crash under ExclusiveAccessBubbleViews::AnimationProgressed().
The crash stacks suggest that |Widget::widget_delegate_| has been set to
null. That only happens in Widget::OnNativeWidgetDestroyed(), but that
should only be triggered by a `delete popup_;` fired asynchronously from
the ExclusiveAccessBubbleViews destructor. And when that same destructor
completes, it should also be resetting the |animation_| member, which
stops and cancels any animation timers.
What appears to be happening is that the bubble is being closed before
the ExclusiveAccessBubbleViews destructor is invoked. Observing
OnWidgetDestroyed() revealed some shutdown codepaths where this is
possible in existing tests.
Likely these crashes happen in the wild because of a system logoff while
the bubble is showing that causes some uncommon shutdown codepaths, or
window close events directly from the OS, which can't be ignored.
To fix, observe OnWidgetDestroyed() and ask the owner of
ExclusiveAccessBubbleViews to delete it. This will cancel any animation
timers and ensure nothing references the null widget_delegate_.
BUG=650882
Review-Url: https://codereview.chromium.org/2850403002
Cr-Commit-Position: refs/heads/master@{#469922}
Committed: https://chromium.googlesource.com/chromium/src/+/d62f8027170674b8d057dce514673fe23b5d2a29
Patch Set 1 #Patch Set 2 : Attempt at getting a crash on MAc #Patch Set 3 : Found the fix. Add a test #Patch Set 4 : self review #Patch Set 5 : Fix lifetime, clang #
Total comments: 20
Patch Set 6 : respond to comments #Messages
Total messages: 43 (33 generated)
|