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

Issue 2682363002: Merge Prevent nested Menu Cancelling (Closed)

Created:
3 years, 10 months ago by jonross
Modified:
3 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/branch-heads/2987
Project:
chromium
Visibility:
Public.

Description

Merge 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -7 lines) Patch
M ui/views/controls/menu/menu_controller.cc View 2 chunks +11 lines, -7 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl.h View 2 chunks +8 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_runner_unittest.cc View 2 chunks +88 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (5 generated)
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/2682363002/1
3 years, 10 months ago (2017-02-09 18:10:23 UTC) #4
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 18:16:03 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/b23180daa22d99ae5c6cb2eaf585...

Powered by Google App Engine
This is Rietveld 408576698