summaryrefslogtreecommitdiffstats
path: root/src/core/network_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-05 13:27:14 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-10 14:49:01 +0000
commit9db27320eda70ec4e4948ae0853dd3f2dd08912b (patch)
tree78ac95011fc1ac4929439573e931eece166ad9a3 /src/core/network_delegate_qt.cpp
parent776442f2117c4b2d6dac75ab56b42bd82e2ce6d0 (diff)
Fix double LoadFinished on URL errors
RenderFrameDeleted was called before DidFinishLoad, which meant m_loadingErrorFrameList was empty and wouldn't detect the page loaded was an error page. Instead this patch relies on the chromium error-page url which we already asserted. Additonally we delay emitting the loadFinished signal until the error page is also done loading, since the error-page can be considered part of the load, and we otherwise have a race condition on toPlainText. Finally we were not getting error-pages when blocking requests because we reported them as aborted them instead of blocked. Change-Id: I945eb838b7f080d4e146f18354e8986e1b88b5cd Task-number: QTBUG-50752 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/network_delegate_qt.cpp')
-rw-r--r--src/core/network_delegate_qt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index 6fdabcd4c..0c0de64fd 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -111,7 +111,7 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::C
QWebEngineUrlRequestInfo requestInfo(infoPrivate);
interceptor->interceptRequest(requestInfo);
if (requestInfo.changed()) {
- int result = infoPrivate->shouldBlockRequest ? net::ERR_ABORTED : net::OK;
+ int result = infoPrivate->shouldBlockRequest ? net::ERR_BLOCKED_BY_CLIENT : net::OK;
if (qUrl != infoPrivate->url)
*newUrl = toGurl(infoPrivate->url);