From 8743ec41593c6e3377f2a8377e553a21a505add6 Mon Sep 17 00:00:00 2001 From: "thomasvl@chromium.org" Date: Thu, 12 Nov 2009 13:28:48 +0000 Subject: Total guess fixes for the bug. Add DCHECKs for main thread in all the places we use animation contexts. Added a stack based class that takes an animate flag to enable/disable animation operations (grouping, durations) to clean up the code that does optional animation. This might help the crashes in the bug because before we created animation context groups when we didn't need them and those empty groups could be tripping up something in the system frameworks (I some something similar in nib loading on 10.6). BUG=26979 TEST=like we have a repeat fail case... Review URL: http://codereview.chromium.org/390014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31781 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_popup_view_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.mm') diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm index beaa239..38b7547 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm @@ -44,7 +44,7 @@ const CGFloat kLeftRightMargin = 8.0; const CGFloat kTextXOffset = 33.0; // Animation duration when animating the popup window smaller. -const float kShrinkAnimationDuration = 0.1; +const CGFloat kShrinkAnimationDuration = 0.1; // Maximum fraction of the popup width that can be used to display match // contents. @@ -365,6 +365,7 @@ void AutocompletePopupViewMac::CreatePopupIfNeeded() { } void AutocompletePopupViewMac::UpdatePopupAppearance() { + DCHECK([NSThread isMainThread]); const AutocompleteResult& result = model_->result(); if (result.empty()) { [[popup_ parentWindow] removeChildWindow:popup_]; -- cgit v1.1