Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
| index e8b5dcbc5b6e19f672fe80df2a1df6617068b40d..cf38f1dfe4e1efdca72eda132e41f6adb5626f30 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -880,7 +880,11 @@ void RenderWidgetHostImpl::ForwardKeyboardEvent( |
| bool is_keyboard_shortcut = false; |
| // Only pre-handle the key event if it's not handled by the input method. |
| - if (!key_event.skip_in_browser) { |
| + // Looking extensively for over a day, a delegate_ of NULL seems |
|
brettw
2012/07/23 17:44:45
This comment isn't clear when not in the context o
Mr4D (OOO till 08-26)
2012/07/23 21:46:17
Done.
|
| + // impossible. But (crbug/134465) has shown that it can happen in some |
| + // non reproducible cases. With v22 this problem did not show anymore so |
| + // that we can get rid of this 'fix' later. |
| + if (delegate_ && !key_event.skip_in_browser) { |
| // We need to set |suppress_next_char_events_| to true if |
| // PreHandleKeyboardEvent() returns true, but |this| may already be |
| // destroyed at that time. So set |suppress_next_char_events_| true here, |