diff options
author | Martin Negyokru <negyokru@inf.u-szeged.hu> | 2022-10-03 12:20:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-03 23:57:34 +0000 |
commit | 81bf140583f7b7bf13cc8dd522e1ca2aba873fc4 (patch) | |
tree | 62da21a6f8613c1821f574a340f8aadba9e2fd73 | |
parent | e5af37e992b391cdbb99e6680628344db2c09774 (diff) |
Do not intercept websocket connection when there is no associated frame
This fix is based on chrome's implementation.
Fixes: QTBUG-107144
Change-Id: If042e4156b8a4bdb27a210c4db94e3a6198aed7d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 64b7da9dab82713fdcb2e03d8a2715421eae5685)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 020ae916a..99a3aa3f4 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -1237,8 +1237,7 @@ ContentBrowserClientQt::WillCreateURLLoaderRequestInterceptors(content::Navigati bool ContentBrowserClientQt::WillInterceptWebSocket(content::RenderFrameHost *frame) { - Q_UNUSED(frame); - return true; // It is probably not worth it to only intercept when interceptors are installed + return frame != nullptr; } QWebEngineUrlRequestInterceptor *getProfileInterceptorFromFrame(content::RenderFrameHost *frame) |