Chromium Code Reviews
DescriptionPrevent nested Menu Cancelling
When being cancelled MenuController will release ViewsDelegate. This is normally
used to prevent shutdown while menus are alive. The release can lead to views
teardowns attempting to cancel the MenuController and to delete the MenuRunner.
This nested cancelling and deletion of the MenuRunner leads to a use-after-free
once the original cancelling resumes.
This change updates MenuController::Cancel to mark the menu as not showing
earlier in the process. So that nested calls to Cancel are rejected.
TEST=MenuRunnerDestructionTest.MenuRunnerDestroyedDuringReleaseRef
BUG=683087
Review-Url: https://codereview.chromium.org/2680863002
Cr-Commit-Position: refs/heads/master@{#448792}
Committed: https://chromium.googlesource.com/chromium/src/+/212e6fd564db2eef90c3855ab96cb75f35cba32d
Patch Set 1 #
Total comments: 2
Messages
Total messages: 14 (8 generated)
|
|||||||||||||||||||||||||||||||||||||