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

Unified Diff: views/controls/menu/chrome_menu.cc

Issue 160458: Fixes possible crash in bookmark menus. Specifically if you had a menu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « views/controls/menu/chrome_menu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/chrome_menu.cc
===================================================================
--- views/controls/menu/chrome_menu.cc (revision 22055)
+++ views/controls/menu/chrome_menu.cc (working copy)
@@ -1790,7 +1790,7 @@
bool open_submenu = false;
if (!part.menu) {
- part.menu = source->GetMenuItem();
+ part.menu = part.parent;
open_submenu = true;
} else {
if (part.menu->GetDelegate()->CanDrag(part.menu)) {
@@ -2339,6 +2339,8 @@
View::ConvertPointToView(NULL, menu, &menu_loc);
part->menu = GetMenuItemAt(menu, menu_loc.x(), menu_loc.y());
part->type = MenuPart::MENU_ITEM;
+ if (!part->menu)
+ part->parent = menu->GetMenuItem();
return true;
}
« no previous file with comments | « views/controls/menu/chrome_menu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698