summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-05 05:15:12 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-05 05:15:12 +0000
commit3588085479a4b0cf5cface7082ddbcdd4bb9b559 (patch)
tree1995179027c9144c7b38c27cb58c71e8b185307f
parent3a7c4ad017ff1e156e3ae869e1f0cff19badba56 (diff)
downloadchromium_src-3588085479a4b0cf5cface7082ddbcdd4bb9b559.zip
chromium_src-3588085479a4b0cf5cface7082ddbcdd4bb9b559.tar.gz
chromium_src-3588085479a4b0cf5cface7082ddbcdd4bb9b559.tar.bz2
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
-rw-r--r--chrome/views/combo_box.cc4
1 files changed, 3 insertions, 1 deletions
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<unsigned char*>(&cbi), 0, sizeof(cbi));
cbi.cbSize = sizeof(cbi);
- ::SendMessage(hwnd, CB_GETCOMBOBOXINFO, 0, reinterpret_cast<LPARAM>(&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(