Chromium Code Reviews| 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..421e0264512e8eacc32dea6b1fd78521d41d2a33 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,22 @@ 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 view |
| + // (see native_tab_contents_container_viewws.cc) and GetInputMethod |
| + // may return NULL; |
| + InputMethod* input_method = GetInputMethod(); |
|
mmocny
2011/09/21 18:57:53
won't compile, change to:
views::InputMethod* ...
|
| + |
| 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); |
| } |
| } |