Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 2850403002: Fix crash under ExclusiveAccessBubbleViews::AnimationProgressed(). (Closed)

Created:
3 years, 7 months ago by tapted
Modified:
3 years, 7 months ago
Reviewers:
msw
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org, Matt Giuca, scheib
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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)
tapted
Hi Mike, please take a look. These crashes have been around for a while on ...
3 years, 7 months ago (2017-05-03 11:58:11 UTC) #23
msw
https://codereview.chromium.org/2850403002/diff/80001/chrome/browser/ui/views/exclusive_access_bubble_views.cc File chrome/browser/ui/views/exclusive_access_bubble_views.cc (right): https://codereview.chromium.org/2850403002/diff/80001/chrome/browser/ui/views/exclusive_access_bubble_views.cc#newcode286 chrome/browser/ui/views/exclusive_access_bubble_views.cc:286: // Although SubtleNotificationView uses WIDGET_OWNS_NATIVE_WIDGET, a close can Would ...
3 years, 7 months ago (2017-05-03 18:48:34 UTC) #24
tapted
https://codereview.chromium.org/2850403002/diff/80001/chrome/browser/ui/views/exclusive_access_bubble_views.cc File chrome/browser/ui/views/exclusive_access_bubble_views.cc (right): https://codereview.chromium.org/2850403002/diff/80001/chrome/browser/ui/views/exclusive_access_bubble_views.cc#newcode286 chrome/browser/ui/views/exclusive_access_bubble_views.cc:286: // Although SubtleNotificationView uses WIDGET_OWNS_NATIVE_WIDGET, a close can On ...
3 years, 7 months ago (2017-05-04 06:42:08 UTC) #27
msw
lgtm
3 years, 7 months ago (2017-05-05 19:27:09 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2850403002/100001
3 years, 7 months ago (2017-05-07 12:32:00 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/378218)
3 years, 7 months ago (2017-05-07 13:47:45 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2850403002/100001
3 years, 7 months ago (2017-05-07 23:46:51 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/420273)
3 years, 7 months ago (2017-05-08 01:03:16 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2850403002/100001
3 years, 7 months ago (2017-05-08 06:51:01 UTC) #40
commit-bot: I haz the power
3 years, 7 months ago (2017-05-08 08:33:58 UTC) #43
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/d62f8027170674b8d057dce51467...

Powered by Google App Engine
This is Rietveld 408576698