From cf06b687845b6e37ef3cd80fd644bb7d769f0033 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 27 Sep 2017 10:24:05 +0200 Subject: Stabilize navigation after render process termination When renderProcessTerminated signal is emitted the invalid view of the corresponding RenderWidgetHost is not destructed yet. Having this invalid view during navigation leads to a crash. The proper way to navigate on renderProcessTerminated is to schedule the navigation with QTimer::singleShot(). Otherwise, warn the user and ignore navigation to avoid crash. Task-number: QTBUG-58478 Change-Id: I54ff62f5d306c8cb1fa17e29f349d1e02c4c8cec Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 655871c9c..466d2826b 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -927,6 +927,8 @@ void RenderWidgetHostViewQt::windowChanged() bool RenderWidgetHostViewQt::forwardEvent(QEvent *event) { + Q_ASSERT(m_host->GetView()); + switch (event->type()) { case QEvent::MouseButtonPress: Focus(); // Fall through. -- cgit v1.2.3