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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 1641553007: Null check RenderWidgetHost pointer from RWHVChildFrame on input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 055fae9346f4c56c7e2fef77c10b76a017241cfc..b5de3a5482550b476bd4b56baa3d43228b67875b 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -367,16 +367,25 @@ uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() {
void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent(
const NativeWebKeyboardEvent& event) {
+ if (!host_)
+ return;
+
host_->ForwardKeyboardEvent(event);
}
void RenderWidgetHostViewChildFrame::ProcessMouseEvent(
const blink::WebMouseEvent& event) {
+ if (!host_)
+ return;
+
host_->ForwardMouseEvent(event);
}
void RenderWidgetHostViewChildFrame::ProcessMouseWheelEvent(
const blink::WebMouseWheelEvent& event) {
+ if (!host_)
+ return;
+
if (event.deltaX != 0 || event.deltaY != 0)
host_->ForwardWheelEvent(event);
}
« 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