Title: [230635] trunk/Source/WebKit
- Revision
- 230635
- Author
- dba...@webkit.org
- Date
- 2018-04-13 09:48:56 -0700 (Fri, 13 Apr 2018)
Log Message
Inline NetworkLoad::sharedWillSendRedirectedRequest() into NetworkLoad::willPerformHTTPRedirection()
https://bugs.webkit.org/show_bug.cgi?id=184593
Reviewed by Alex Christensen.
Following the removal of the pre-Network Session code in r227364, NetworkLoad::sharedWillSendRedirectedRequest()
is only referenced from NetworkLoad::willPerformHTTPRedirection(). We should inline its
implementation into the NetworkLoad::willPerformHTTPRedirection(), remove a function call,
and the cognitive load to follow such a function call when reading the code.
No functionality changed. So, no new tests.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::willPerformHTTPRedirection): Moved the implementation of NetworkLoad::sharedWillSendRedirectedRequest()
into this function.
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest): Deleted. Moved its implementation
into NetworkLoad::willPerformHTTPRedirection().
* NetworkProcess/NetworkLoad.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (230634 => 230635)
--- trunk/Source/WebKit/ChangeLog 2018-04-13 16:29:08 UTC (rev 230634)
+++ trunk/Source/WebKit/ChangeLog 2018-04-13 16:48:56 UTC (rev 230635)
@@ -1,3 +1,24 @@
+2018-04-13 Daniel Bates <daba...@apple.com>
+
+ Inline NetworkLoad::sharedDidReceiveResponse() into NetworkLoad::notifyDidReceiveResponse()
+ https://bugs.webkit.org/show_bug.cgi?id=184592
+
+ Reviewed by Alex Christensen.
+
+ Following the removal of the pre-Network Session code in r227364, NetworkLoad::sharedDidReceiveResponse()
+ is only referenced from NetworkLoad::notifyDidReceiveResponse(). We should inline its
+ implementation into the NetworkLoad::notifyDidReceiveResponse(), remove a function
+ call, and the cognitive load to follow such a function call when reading the code.
+
+ No functionality changed. So, no new tests.
+
+ * NetworkProcess/NetworkLoad.cpp:
+ (WebKit::NetworkLoad::notifyDidReceiveResponse): Moved the implementation of NetworkLoad::sharedDidReceiveResponse()
+ into this function.
+ (WebKit::NetworkLoad::sharedDidReceiveResponse): Deleted. Moved its implementation into
+ NetworkLoad::notifyDidReceiveResponse().
+ * NetworkProcess/NetworkLoad.h:
+
2018-04-13 Brent Fulgham <bfulg...@apple.com>
REGRESSION(r230468): Improper assertion firing under STP
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp (230634 => 230635)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-04-13 16:29:08 UTC (rev 230634)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-04-13 16:48:56 UTC (rev 230635)
@@ -191,15 +191,6 @@
return m_client.get().shouldCaptureExtraNetworkLoadMetrics();
}
-NetworkLoadClient::ShouldContinueDidReceiveResponse NetworkLoad::sharedDidReceiveResponse(ResourceResponse&& response)
-{
- response.setSource(ResourceResponse::Source::Network);
- if (m_parameters.needsCertificateInfo)
- response.includeCertificateInfo();
-
- return m_client.get().didReceiveResponse(WTFMove(response));
-}
-
void NetworkLoad::sharedWillSendRedirectedRequest(ResourceRequest&& request, ResourceResponse&& redirectResponse)
{
// We only expect to get the willSendRequest callback from ResourceHandle as the result of a redirect.
@@ -343,7 +334,11 @@
m_recorder->recordResponseReceived(response);
#endif
- if (sharedDidReceiveResponse(WTFMove(response)) == NetworkLoadClient::ShouldContinueDidReceiveResponse::No) {
+ response.setSource(ResourceResponse::Source::Network);
+ if (m_parameters.needsCertificateInfo)
+ response.includeCertificateInfo();
+
+ if (m_client.get().didReceiveResponse(WTFMove(response)) == NetworkLoadClient::ShouldContinueDidReceiveResponse::No) {
m_responseCompletionHandler = WTFMove(completionHandler);
return;
}
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.h (230634 => 230635)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-04-13 16:29:08 UTC (rev 230634)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-04-13 16:48:56 UTC (rev 230635)
@@ -79,7 +79,6 @@
#endif
void initialize(NetworkSession&);
- NetworkLoadClient::ShouldContinueDidReceiveResponse sharedDidReceiveResponse(WebCore::ResourceResponse&&);
void sharedWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&);
// NetworkDataTaskClient
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes