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

Unified Diff: ui/views/controls/button/button_dropdown.cc

Issue 10832184: Fixed memory leak. Untangled confusing code with menu initialization and ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/views/controls/button/button_dropdown.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/button_dropdown.cc
===================================================================
--- ui/views/controls/button/button_dropdown.cc (revision 150365)
+++ ui/views/controls/button/button_dropdown.cc (working copy)
@@ -175,8 +175,8 @@
menu_showing_ = true;
// Create and run menu. Display an empty menu if model is NULL.
- if (model_) {
- MenuModelAdapter menu_delegate(model_);
+ if (model_.get()) {
+ MenuModelAdapter menu_delegate(model_.get());
menu_delegate.set_triggerable_event_flags(triggerable_event_flags());
menu_runner_.reset(new MenuRunner(menu_delegate.CreateMenu()));
MenuRunner::RunResult result =
« no previous file with comments | « ui/views/controls/button/button_dropdown.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698