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

Issue 2684993009: Stop MenuItemView From Directly Caching MenuController (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/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop MenuItemView From Directly Caching MenuController When a MenuController closes its associated Widget is destroyed later on the MessageLoop. Due to this it is possible for a MenuHostRootView to receive input while the associated MenuController has been destroyed. MenuHostRootView accesses the MenuController through MenuItemView which simply caches it. This change updates MenuItemView to take a WeakPtr to the controller. TEST=MenuControllerTest.HostReceivesInputBeforeDestruction BUG=690097 Review-Url: https://codereview.chromium.org/2684993009 Cr-Commit-Position: refs/heads/master@{#449663} Committed: https://chromium.googlesource.com/chromium/src/+/549b48a07f5ac2def1b8ad0549f3fddaf67b7ff5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -7 lines) Patch
M ui/views/controls/menu/menu_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 6 chunks +29 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_item_view.h View 3 chunks +9 lines, -2 lines 0 comments Download
M ui/views/controls/menu/menu_item_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/menu/submenu_view.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 17 (12 generated)
jonross
Hey sky@, It appears that the MessageLoop can hold input events enqueued for a MenuHostRootView ...
3 years, 10 months ago (2017-02-10 02:53:43 UTC) #4
sky
LGTM
3 years, 10 months ago (2017-02-10 18:00:29 UTC) #11
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/2684993009/1
3 years, 10 months ago (2017-02-10 18:09:59 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/549b48a07f5ac2def1b8ad0549f3fddaf67b7ff5
3 years, 10 months ago (2017-02-10 18:18:05 UTC) #16
msramek
3 years, 10 months ago (2017-02-13 09:25:14 UTC) #17
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2690013002/ by msramek@chromium.org.

The reason for reverting is: Significant memory leak caught by ChromeOS
ASan/LSan in the test added by this CL.

For details, please see:
https://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%2....

Powered by Google App Engine
This is Rietveld 408576698