From 3588085479a4b0cf5cface7082ddbcdd4bb9b559 Mon Sep 17 00:00:00 2001 From: "brettw@google.com" Date: Fri, 5 Dec 2008 05:15:12 +0000 Subject: Fix a crash on 64-bit systems when an external message hook is installed. The proxying for CB_GETCOMBOXINFO is wrong and will crash. Instead, call GetComboBoxInfo. BUG=49 Review URL: http://codereview.chromium.org/13156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6420 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/combo_box.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/views') diff --git a/chrome/views/combo_box.cc b/chrome/views/combo_box.cc index 8315ced..87d1592 100644 --- a/chrome/views/combo_box.cc +++ b/chrome/views/combo_box.cc @@ -39,7 +39,9 @@ gfx::Size ComboBox::GetPreferredSize() { COMBOBOXINFO cbi; memset(reinterpret_cast(&cbi), 0, sizeof(cbi)); cbi.cbSize = sizeof(cbi); - ::SendMessage(hwnd, CB_GETCOMBOBOXINFO, 0, reinterpret_cast(&cbi)); + // Note: Don't use CB_GETCOMBOBOXINFO since that crashes on WOW64 systems + // when you have a global message hook installed. + GetComboBoxInfo(hwnd, &cbi); gfx::Rect rect_item(cbi.rcItem); gfx::Rect rect_button(cbi.rcButton); gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( -- cgit v1.1