From 70853b00ae4f3a0b3c96978cfa4a5caeabacb60b Mon Sep 17 00:00:00 2001 From: "mattm@chromium.org" Date: Fri, 23 Oct 2009 01:51:33 +0000 Subject: Linux: fix crash in PopulateCookieDetails called by OnSelectionChanged callback which can be called while the view and model are in inconsistent states. BUG=25535 TEST=open cookies manager, select all, remove all Review URL: http://codereview.chromium.org/334001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29860 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/options/cookies_view.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/browser/gtk/options/cookies_view.cc') diff --git a/chrome/browser/gtk/options/cookies_view.cc b/chrome/browser/gtk/options/cookies_view.cc index b2b16e0..6e47043 100644 --- a/chrome/browser/gtk/options/cookies_view.cc +++ b/chrome/browser/gtk/options/cookies_view.cc @@ -366,7 +366,16 @@ void CookiesView::RemoveSelectedCookies() { } } +void CookiesView::OnAnyModelUpdateStart() { + g_signal_handlers_block_by_func( + G_OBJECT(selection_), reinterpret_cast(OnSelectionChanged), + this); +} + void CookiesView::OnAnyModelUpdate() { + g_signal_handlers_unblock_by_func( + G_OBJECT(selection_), reinterpret_cast(OnSelectionChanged), + this); EnableControls(); } -- cgit v1.1