DescriptionMerge Prevent nested Menu Cancelling
Prevent 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
TBR=sky@chromium.org
NOTRY=true
NOPRESUBMIT=true
Review-Url: https://codereview.chromium.org/2680863002
Cr-Commit-Position: refs/heads/master@{#448792}
(cherry picked from commit 212e6fd564db2eef90c3855ab96cb75f35cba32d)
Review-Url: https://codereview.chromium.org/2682363002
Cr-Commit-Position: refs/branch-heads/2987@{#410}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
Committed: https://chromium.googlesource.com/chromium/src/+/b23180daa22d99ae5c6cb2eaf5856e71701f01de
Patch Set 1 #
Messages
Total messages: 7 (5 generated)
|