From f57d74bf42bbeef2565e69fef45e1c0b55e89cbb Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Thu, 4 Sep 2014 17:00:56 +0200 Subject: Fix an assertion in net/url_request/url_request.cc:656 Instead of cancelling the request we have to set error to net::ERR_ABORTED since URLRequest::BeforeRequestComplete enforces not receiving cancelled requests with an assertion. Our API requires the symmetric LoadStarten - LoadStopped signals even on an ignored request so cancelling the request and returning early would not be a solution, since it would not emit any LoadStopped signal. Change-Id: I1b13fe6520121805bcf420e810999c520c12bd5c Reviewed-by: Peter Varga Reviewed-by: Michael Bruning --- src/core/network_delegate_qt.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp index 8a79bbc8a..81ab4b6bc 100644 --- a/src/core/network_delegate_qt.cpp +++ b/src/core/network_delegate_qt.cpp @@ -136,9 +136,7 @@ void NetworkDelegateQt::CompleteURLRequestOnIOThread(net::URLRequest *request, error = net::OK; break; case WebContentsAdapterClient::IgnoreRequest: - error = net::OK; - // We can cancel the request here since we are on the IO thread. - request->Cancel(); + error = net::ERR_ABORTED; break; default: error = net::ERR_FAILED; -- cgit v1.2.3