Chromium Code Reviews
DescriptionMerge 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 #
Messages
Total messages: 7 (5 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||