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

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 2684993009: Stop MenuItemView From Directly Caching MenuController (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 37db59dfd9313ef7ac30b9dbc1b132207cbe56ea..335945f284ed025510dfe538b0f75ded3e3421d5 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -1554,7 +1554,7 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source,
alt_menu->PrepareForRun(
false, has_mnemonics,
source->GetMenuItem()->GetRootMenuItem()->show_mnemonics_);
- alt_menu->controller_ = this;
+ alt_menu->controller_ = AsWeakPtr();
SetSelection(alt_menu, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
return true;
}
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698