diff options
author | tapted <tapted@chromium.org> | 2015-03-02 22:22:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-03 06:23:03 +0000 |
commit | b7f4866c0a046daf3d836ee058edddf4905d30af (patch) | |
tree | 6e0ef094f72ca2de601383fb3202249997c1b726 /ui/app_list | |
parent | 918a4ce8ac482431fd75adc4ff3907e2d75f4cef (diff) | |
download | chromium_src-b7f4866c0a046daf3d836ee058edddf4905d30af.zip chromium_src-b7f4866c0a046daf3d836ee058edddf4905d30af.tar.gz chromium_src-b7f4866c0a046daf3d836ee058edddf4905d30af.tar.bz2 |
Handle sync changes on the Start Page tiles while context menus are showing.
This handles the case where
SearchResultTileItemView::SetSearchResult(SearchResult*) may be called
from a nested run loop while its context menu is showing. This cancels
the menu (it's for the old item).
BUG=462470
TEST=Right-click on a start page app to get its context menu. On another
machine (with the same profile), uninstall the app. Context menu should
disappear. Chrome shouldn't crash.
Review URL: https://codereview.chromium.org/969953002
Cr-Commit-Position: refs/heads/master@{#318844}
Diffstat (limited to 'ui/app_list')
-rw-r--r-- | ui/app_list/views/search_result_tile_item_view.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/app_list/views/search_result_tile_item_view.cc b/ui/app_list/views/search_result_tile_item_view.cc index ae3d8b4..1823514 100644 --- a/ui/app_list/views/search_result_tile_item_view.cc +++ b/ui/app_list/views/search_result_tile_item_view.cc @@ -26,6 +26,10 @@ SearchResultTileItemView::~SearchResultTileItemView() { } void SearchResultTileItemView::SetSearchResult(SearchResult* item) { + // Handle the case where this may be called from a nested run loop while its + // context menu is showing. This cancels the menu (it's for the old item). + context_menu_runner_.reset(); + SetVisible(item != NULL); SearchResult* old_item = item_; |