| Index: chrome/browser/renderer_host/render_widget_host_view_views.cc
|
| diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
|
| index 920d81c7c3fdce550075a331c609ca49e79952cf..af4e092fe23c8d239eb2a488c5f85cbd64011bdc 100644
|
| --- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
|
| +++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
|
| @@ -271,14 +271,21 @@ void RenderWidgetHostViewViews::ImeUpdateTextInputState(
|
| // as true. We need to support "can_compose_inline=false" for PPAPI plugins
|
| // that may want to avoid drawing composition-text by themselves and pass
|
| // the responsibility to the browser.
|
| - DCHECK(GetInputMethod());
|
| +
|
| + // This is async message and by the time the ipc arrived,
|
| + // RWHVV may be detached from Top level widget, in which case
|
| + // GetInputMethod may return NULL;
|
| + views::InputMethod* input_method = GetInputMethod();
|
| +
|
| if (text_input_type_ != type) {
|
| text_input_type_ = type;
|
| - GetInputMethod()->OnTextInputTypeChanged(this);
|
| + if (input_method)
|
| + input_method->OnTextInputTypeChanged(this);
|
| }
|
| if (caret_bounds_ != caret_rect) {
|
| caret_bounds_ = caret_rect;
|
| - GetInputMethod()->OnCaretBoundsChanged(this);
|
| + if (input_method)
|
| + input_method->OnCaretBoundsChanged(this);
|
| }
|
| }
|
|
|
|
|