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

Unified Diff: ui/app_list/views/search_result_tile_item_view.cc

Issue 1313353007: Fix use after free in SearchResultTileItemView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_result_tile_item_view.cc
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 3a8ecbe06be630b9581e64b5d75a3ab50d1ac99f..123e5156f3f4d69ab35a7ac710c1d18dd706fa73 100644
--- a/ui/app_list/views/search_result_tile_item_view.cc
+++ b/ui/app_list/views/search_result_tile_item_view.cc
@@ -76,6 +76,9 @@ void SearchResultTileItemView::OnIconChanged() {
}
void SearchResultTileItemView::OnResultDestroying() {
+ // The menu comes from |item_|. If we're showing a menu we need to cancel it.
+ context_menu_runner_.reset();
+
if (item_)
item_->RemoveObserver(this);
item_ = NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698