diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 21:17:27 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 21:17:27 +0000 |
commit | 831f0ecea5f0f5a4f2796117976d6885f8f27252 (patch) | |
tree | aa0ba803e53908d59f4d19cda4fdcae6b6f99d92 /chrome | |
parent | 9fa97bead65b5a60007dd8cb05488ae1848a81f6 (diff) | |
download | chromium_src-831f0ecea5f0f5a4f2796117976d6885f8f27252.zip chromium_src-831f0ecea5f0f5a4f2796117976d6885f8f27252.tar.gz chromium_src-831f0ecea5f0f5a4f2796117976d6885f8f27252.tar.bz2 |
Attempt at fixing reliability crash spike. The traces lead me to
believe RichEdit is sending a WM_COMMAND with an id of 35000, which
corresponds to IDC_STAR. Peter's changing of IDs resulted in IDC_STAR
getting set to 35000. I'm hoping the WM_COMMAND sent from the rich
edit has it's high bits set appropriately so that this change will
result in not trying to execute IDC_STAR when we get the command.
WARNING: this is all speculation from looking at the traces. I
couldn't repro on my machine.
BUG=5405
TEST=none
Review URL: http://codereview.chromium.org/14010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/window.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc index df70094..1a388e0 100644 --- a/chrome/views/window.cc +++ b/chrome/views/window.cc @@ -342,8 +342,12 @@ LRESULT Window::OnAppCommand(HWND window, short app_command, WORD device, void Window::OnCommand(UINT notification_code, int command_id, HWND window) { // We NULL check |window_delegate_| here because we can be sent WM_COMMAND // messages even after the window is destroyed. - if (!window_delegate_ || !window_delegate_->ExecuteWindowsCommand(command_id)) + // If the notification code is > 1 it means it is control specific and we + // should ignore it. + if (notification_code > 1 || !window_delegate_ || + window_delegate_->ExecuteWindowsCommand(command_id)) { WidgetWin::OnCommand(notification_code, command_id, window); + } } void Window::OnDestroy() { |