Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 348022: Fix for the crasher with select drop-downs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 30398)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -940,6 +940,9 @@
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::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::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::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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698