diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 22:16:37 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 22:16:37 +0000 |
commit | 61206e0c3dfcf17e748dec65139d7e8e3449c8a3 (patch) | |
tree | d2d04a606cb19390441fc3d60c3c75962e0fdb1f /chrome | |
parent | f6da194c837f7b0e208ca4c158a839a21dd3e329 (diff) | |
download | chromium_src-61206e0c3dfcf17e748dec65139d7e8e3449c8a3.zip chromium_src-61206e0c3dfcf17e748dec65139d7e8e3449c8a3.tar.gz chromium_src-61206e0c3dfcf17e748dec65139d7e8e3449c8a3.tar.bz2 |
The fix for bug 24248 did not fully bullet-proof the RenderWidgetHostViewWin
for messages recieved after the render view host has been NULLed, causing
crashers with select drop-downs.
BUG=25290
TEST=Make sure select drop-downs work and don't crash the browser.
Review URL: http://codereview.chromium.org/348022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index b11b6b8..f10f728 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -940,6 +940,9 @@ LRESULT RenderWidgetHostViewWin::OnNotify(int w_param, NMHDR* header) { LRESULT RenderWidgetHostViewWin::OnImeSetContext( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { + if (!render_widget_host_) + return 0; + // We need status messages about the focused input control from a // renderer process when: // * the current input context has IMEs, and; @@ -965,6 +968,9 @@ LRESULT RenderWidgetHostViewWin::OnImeSetContext( LRESULT RenderWidgetHostViewWin::OnImeStartComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { + if (!render_widget_host_) + return 0; + // Reset the composition status and create IME windows. ime_input_.CreateImeWindow(m_hWnd); ime_input_.ResetComposition(m_hWnd); @@ -977,6 +983,9 @@ LRESULT RenderWidgetHostViewWin::OnImeStartComposition( LRESULT RenderWidgetHostViewWin::OnImeComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { + if (!render_widget_host_) + return 0; + // At first, update the position of the IME window. ime_input_.UpdateImeWindow(m_hWnd); @@ -1014,6 +1023,9 @@ LRESULT RenderWidgetHostViewWin::OnImeComposition( LRESULT RenderWidgetHostViewWin::OnImeEndComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { + if (!render_widget_host_) + return 0; + if (ime_input_.is_composing()) { // A composition has been ended while there is an ongoing composition, // i.e. the ongoing composition has been canceled. |