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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10790058: Workaround a crash occuring only in v20 and v21 without a repro case (need more data for good fix) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comment Created 8 years, 5 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: 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..7fe153e88b93b67960da333e195bf304d0748d04 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) {
+ // A delegate_ of NULL seems impossible but crash reports show that it
+ // can happen (see http://crbug.com/134465). This doesn't seem to happen
+ // with Chrome 22 and later, so checking the delegate_ here can be removed
+ // once Chrome 22 goes to stable..
+ 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,
« 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