summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-09-27 10:24:05 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-10-04 14:06:08 +0000
commitcf06b687845b6e37ef3cd80fd644bb7d769f0033 (patch)
tree51bde1ae4d65760ff566efbeab9a9282508a3bec /src/core/render_widget_host_view_qt.cpp
parent64a5f315206fac2316e0b4a5a65a5d1f66b1a219 (diff)
Stabilize navigation after render process terminationv5.10.0-beta1
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 <allan.jensen@qt.io>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 655871c9..466d2826 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.