summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-13 17:19:11 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-11 11:48:37 +0000
commitce2c439fac1b9956b0496d474e7fbcc1df98cc34 (patch)
treeb5208c32672efd3651f6623f1bc9a5da94876f41 /src/core/web_contents_delegate_qt.cpp
parentf404789cfe0752df5776972d153ec1eb750b1623 (diff)
Fix recovery after sub-process crashv6.4.0-beta3
We no longer get RenderViewChanged signal but only a RenderViewReady signal after a crash. Change-Id: Ib14cb3092e46e699d55bc252c9dddca524f6b8b7 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit 2dfde66e1b9f95765cc61ae9985f5e7b58a8cb02) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 512c9a403..66598203e 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -308,6 +308,17 @@ void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *, con
}
}
+void WebContentsDelegateQt::RenderViewReady()
+{
+ // The render view might have returned after a crash without us getting a RenderViewHostChanged call
+ content::RenderWidgetHostView *newHostView = web_contents()->GetRenderWidgetHostView();
+ if (newHostView) {
+ auto *rwhv = static_cast<RenderWidgetHostViewQt *>(newHostView);
+ Q_ASSERT(rwhv->delegate());
+ rwhv->delegate()->updateAdapterClientIfNeeded(m_viewClient);
+ }
+}
+
void WebContentsDelegateQt::emitLoadStarted(bool isErrorPage)
{
for (auto &&wc : m_certificateErrorControllers)