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

Issue 2678343012: Merge MenuRunner Releasing (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 MenuRunner Releasing Fix MenuRunner Releasing It is possible for MenuRunner to be released while there is no currently active MenuController. However the MenuController which it created has not yet been destroyed. It is possible for there to be multiple non-destroyed MenuControllers. Due to this MenuController::GetActiveInstance is not an appropriate way to determine if the controller you are working with has been destroyed or not. This change updates MenuController to begin providing a WeakPtr of itself. This allows its internal code to detect when delegates have deleted it in response to callbacks. This also allows MenuRunner to track the lifetime of the controller is created. This change also updates MenuRunner to make sure that it destroys the controller it created when it is being released. TEST=MenuRunnerImplTest.MenuRunnerDestroyedWithNoActiveController BUG=683087 TBR=sky@chromium.org NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2654093005 Cr-Commit-Position: refs/heads/master@{#446498} (cherry picked from commit f64dfaabfd764eaca10cc87973f22422a8ee721a) Review-Url: https://codereview.chromium.org/2678343012 Cr-Commit-Position: refs/branch-heads/2987@{#406} Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/28631343e1cc6a3c5d4b32b3117cebe45325c026

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -40 lines) Patch
M ui/views/controls/menu/menu_controller.h View 3 chunks +8 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 9 chunks +36 lines, -22 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_runner_impl.cc View 3 chunks +5 lines, -6 lines 0 comments Download
M ui/views/controls/menu/menu_runner_unittest.cc View 3 chunks +45 lines, -1 line 0 comments Download
M ui/views/test/menu_test_utils.h View 2 chunks +20 lines, -4 lines 0 comments Download
M ui/views/test/menu_test_utils.cc View 1 chunk +11 lines, -5 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/2678343012/1
3 years, 10 months ago (2017-02-09 16:04:42 UTC) #4
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 16:07:27 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/28631343e1cc6a3c5d4b32b3117c...

Powered by Google App Engine
This is Rietveld 408576698