Diff
Modified: trunk/Source/WebKit/ChangeLog (234895 => 234896)
--- trunk/Source/WebKit/ChangeLog 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/ChangeLog 2018-08-15 20:15:57 UTC (rev 234896)
@@ -1,3 +1,40 @@
+2018-08-15 Alex Christensen <[email protected]>
+
+ NetworkCORSPreflightChecker should proceed in case of ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested even though the WebKit app is not implementing the didReceiveAuthenticationChallenge/didReceiveAuthenticationChallengeInFrame callback
+ https://bugs.webkit.org/show_bug.cgi?id=188592
+ <rdar://problem/43210331>
+
+ Reviewed by Youenn Fablet.
+
+ Do a canAuthenticateAgainstProtectionSpace check in NetworkCORSPreflightChecker like we do in NetworkLoad.
+ Use CompletionHandlers to make the now 3 different canAuthenticateAgainstProtectionSpace checks look the same from the NetworkProcess.
+
+ * NetworkProcess/NetworkCORSPreflightChecker.cpp:
+ (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
+ * NetworkProcess/NetworkCORSPreflightChecker.h:
+ * NetworkProcess/NetworkDataTask.h:
+ * NetworkProcess/NetworkLoad.cpp:
+ (WebKit::NetworkLoad::didReceiveChallenge):
+ * NetworkProcess/NetworkLoad.h:
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
+ (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
+ * NetworkProcess/NetworkProcess.h:
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
+ (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace): Deleted.
+ * NetworkProcess/NetworkResourceLoader.h:
+ * NetworkProcess/PingLoad.cpp:
+ (WebKit::PingLoad::didReceiveChallenge):
+ * NetworkProcess/PingLoad.h:
+ * NetworkProcess/PreconnectTask.cpp:
+ (WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
+ (WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace): Deleted.
+ * NetworkProcess/PreconnectTask.h:
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+ (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
+
2018-08-15 Michael Catanzaro <[email protected]>
[WPE][GTK] WaylandCompositor fails to properly remove surface from its page map
Modified: trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -89,7 +89,7 @@
m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), "Preflight response is not successful"_s, ResourceError::Type::AccessControl });
}
-void NetworkCORSPreflightChecker::didReceiveChallenge(const WebCore::AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler)
+void NetworkCORSPreflightChecker::didReceiveChallenge(WebCore::AuthenticationChallenge&& challenge, ChallengeCompletionHandler&& completionHandler)
{
RELEASE_LOG_IF_ALLOWED("didReceiveChallenge, authentication scheme: %u", challenge.protectionSpace().authenticationScheme());
@@ -102,7 +102,15 @@
return;
}
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(challenge.protectionSpace(), m_parameters.pageID, m_parameters.frameID, [this, weakThis = makeWeakPtr(this), completionHandler = WTFMove(completionHandler), challenge = WTFMove(challenge)] (bool canAuthenticate) mutable {
+ if (!canAuthenticate)
+ return completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, { });
+ NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler));
+ });
+#else
NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler));
+#endif
}
void NetworkCORSPreflightChecker::didReceiveResponseNetworkSession(WebCore::ResourceResponse&& response, ResponseCompletionHandler&& completionHandler)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -30,6 +30,7 @@
#include <WebCore/StoredCredentialsPolicy.h>
#include <pal/SessionID.h>
#include <wtf/CompletionHandler.h>
+#include <wtf/WeakPtr.h>
namespace WebCore {
class ResourceError;
@@ -38,7 +39,7 @@
namespace WebKit {
-class NetworkCORSPreflightChecker final : private NetworkDataTaskClient {
+class NetworkCORSPreflightChecker final : private NetworkDataTaskClient, public CanMakeWeakPtr<NetworkCORSPreflightChecker> {
WTF_MAKE_FAST_ALLOCATED;
public:
struct Parameters {
@@ -63,7 +64,7 @@
private:
void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
- void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) final;
+ void didReceiveChallenge(WebCore::AuthenticationChallenge&&, ChallengeCompletionHandler&&) final;
void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) final;
void didReceiveData(Ref<WebCore::SharedBuffer>&&) final;
void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&) final;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -59,7 +59,7 @@
class NetworkDataTaskClient {
public:
virtual void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) = 0;
- virtual void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) = 0;
+ virtual void didReceiveChallenge(WebCore::AuthenticationChallenge&&, ChallengeCompletionHandler&&) = 0;
virtual void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) = 0;
virtual void didReceiveData(Ref<WebCore::SharedBuffer>&&) = 0;
virtual void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&) = 0;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -254,7 +254,7 @@
m_client.get().willSendRedirectedRequest(WTFMove(oldRequest), WTFMove(request), WTFMove(redirectResponse));
}
-void NetworkLoad::didReceiveChallenge(const AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler)
+void NetworkLoad::didReceiveChallenge(AuthenticationChallenge&& challenge, ChallengeCompletionHandler&& completionHandler)
{
m_challenge = challenge;
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -84,7 +84,7 @@
// NetworkDataTaskClient
void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
- void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) final;
+ void didReceiveChallenge(WebCore::AuthenticationChallenge&&, ChallengeCompletionHandler&&) final;
void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) final;
void didReceiveData(Ref<WebCore::SharedBuffer>&&) final;
void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&) final;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -669,40 +669,21 @@
}
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-static uint64_t generateCanAuthenticateIdentifier()
+void NetworkProcess::canAuthenticateAgainstProtectionSpace(const WebCore::ProtectionSpace& protectionSpace, uint64_t pageID, uint64_t frameID, CompletionHandler<void(bool)>&& completionHandler)
{
- static uint64_t lastLoaderID = 0;
- return ++lastLoaderID;
+ static uint64_t lastCompletionHandlerID = 0;
+ uint64_t completionHandlerID = ++lastCompletionHandlerID;
+ m_canAuthenticateAgainstProtectionSpaceCompletionHandlers.add(completionHandlerID, WTFMove(completionHandler));
+ parentProcessConnection()->send(Messages::NetworkProcessProxy::CanAuthenticateAgainstProtectionSpace(completionHandlerID, pageID, frameID, protectionSpace), 0);
}
-void NetworkProcess::canAuthenticateAgainstProtectionSpace(NetworkResourceLoader& loader, const WebCore::ProtectionSpace& protectionSpace)
+void NetworkProcess::continueCanAuthenticateAgainstProtectionSpace(uint64_t completionHandlerID, bool canAuthenticate)
{
- uint64_t loaderID = generateCanAuthenticateIdentifier();
- m_waitingNetworkResourceLoaders.set(loaderID, loader);
- parentProcessConnection()->send(Messages::NetworkProcessProxy::CanAuthenticateAgainstProtectionSpace(loaderID, loader.pageID(), loader.frameID(), protectionSpace), 0);
-}
-
-#if ENABLE(SERVER_PRECONNECT)
-void NetworkProcess::canAuthenticateAgainstProtectionSpace(PreconnectTask& preconnectTask, const WebCore::ProtectionSpace& protectionSpace)
-{
- uint64_t loaderID = generateCanAuthenticateIdentifier();
- m_waitingPreconnectTasks.set(loaderID, makeWeakPtr(preconnectTask));
- parentProcessConnection()->send(Messages::NetworkProcessProxy::CanAuthenticateAgainstProtectionSpace(loaderID, preconnectTask.pageID(), preconnectTask.frameID(), protectionSpace), 0);
-}
-#endif
-
-void NetworkProcess::continueCanAuthenticateAgainstProtectionSpace(uint64_t loaderID, bool canAuthenticate)
-{
- if (auto resourceLoader = m_waitingNetworkResourceLoaders.take(loaderID)) {
- resourceLoader.value()->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);
+ if (auto completionHandler = m_canAuthenticateAgainstProtectionSpaceCompletionHandlers.take(completionHandlerID)) {
+ completionHandler(canAuthenticate);
return;
}
-#if ENABLE(SERVER_PRECONNECT)
- if (auto preconnectTask = m_waitingPreconnectTasks.take(loaderID)) {
- preconnectTask->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);
- return;
- }
-#endif
+ ASSERT_NOT_REACHED();
}
#endif
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -123,11 +123,8 @@
void findPendingDownloadLocation(NetworkDataTask&, ResponseCompletionHandler&&, const WebCore::ResourceResponse&);
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- void canAuthenticateAgainstProtectionSpace(NetworkResourceLoader&, const WebCore::ProtectionSpace&);
-#if ENABLE(SERVER_PRECONNECT)
- void canAuthenticateAgainstProtectionSpace(PreconnectTask&, const WebCore::ProtectionSpace&);
+ void canAuthenticateAgainstProtectionSpace(const WebCore::ProtectionSpace&, uint64_t pageID, uint64_t frameID, CompletionHandler<void(bool)>&&);
#endif
-#endif
void prefetchDNS(const String&);
@@ -225,7 +222,7 @@
void resumeDownload(PAL::SessionID, DownloadID, const IPC::DataReference& resumeData, const String& path, SandboxExtension::Handle&&);
void cancelDownload(DownloadID);
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- void continueCanAuthenticateAgainstProtectionSpace(uint64_t resourceLoadIdentifier, bool canAuthenticate);
+ void continueCanAuthenticateAgainstProtectionSpace(uint64_t completionHandlerID, bool canAuthenticate);
#endif
void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&);
void continueDecidePendingDownloadDestination(DownloadID, String destination, SandboxExtension::Handle&&, bool allowOverwrite);
@@ -284,10 +281,9 @@
typedef HashMap<const char*, std::unique_ptr<NetworkProcessSupplement>, PtrHash<const char*>> NetworkProcessSupplementMap;
NetworkProcessSupplementMap m_supplements;
- HashMap<uint64_t, Function<void ()>> m_sandboxExtensionForBlobsCompletionHandlers;
- HashMap<uint64_t, Ref<NetworkResourceLoader>> m_waitingNetworkResourceLoaders;
-#if ENABLE(SERVER_PRECONNECT)
- HashMap<uint64_t, WeakPtr<PreconnectTask>> m_waitingPreconnectTasks;
+ HashMap<uint64_t, Function<void()>> m_sandboxExtensionForBlobsCompletionHandlers;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ HashMap<uint64_t, CompletionHandler<void(bool)>> m_canAuthenticateAgainstProtectionSpaceCompletionHandlers;
#endif
HashSet<PAL::SessionID> m_sessionsControlledByAutomation;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -938,14 +938,11 @@
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
void NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync(const ProtectionSpace& protectionSpace)
{
- NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(*this, protectionSpace);
+ NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(protectionSpace, pageID(), frameID(), [this, protectedThis = makeRef(*this)] (bool result) {
+ if (m_networkLoad)
+ m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(result);
+ });
}
-
-void NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace(bool result)
-{
- if (m_networkLoad)
- m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(result);
-}
#endif
bool NetworkResourceLoader::isAlwaysOnLoggingAllowed() const
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -80,9 +80,6 @@
// Message handlers.
void didReceiveNetworkResourceLoaderMessage(IPC::Connection&, IPC::Decoder&);
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- void continueCanAuthenticateAgainstProtectionSpace(bool);
-#endif
void continueWillSendRequest(WebCore::ResourceRequest&& newRequest, bool isAllowedToAskUserForCredentials);
const WebCore::ResourceResponse& response() const { return m_response; }
Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -111,7 +111,7 @@
});
}
-void PingLoad::didReceiveChallenge(const AuthenticationChallenge&, ChallengeCompletionHandler&& completionHandler)
+void PingLoad::didReceiveChallenge(AuthenticationChallenge&&, ChallengeCompletionHandler&& completionHandler)
{
RELEASE_LOG_IF_ALLOWED("didReceiveChallenge");
auto weakThis = makeWeakPtr(*this);
Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/PingLoad.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -55,7 +55,7 @@
WebCore::ContentSecurityPolicy* contentSecurityPolicy() const;
void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
- void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) final;
+ void didReceiveChallenge(WebCore::AuthenticationChallenge&&, ChallengeCompletionHandler&&) final;
void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) final;
void didReceiveData(Ref<WebCore::SharedBuffer>&&) final;
void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&) final;
Modified: trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -100,17 +100,15 @@
{
if (!pageID()) {
// The preconnect was started by the UIProcess.
- continueCanAuthenticateAgainstProtectionSpace(false);
+ m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(false);
return;
}
- NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(*this, protectionSpace);
+ NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(protectionSpace, pageID(), frameID(), [weakThis = makeWeakPtr(this)] (bool result) {
+ if (weakThis)
+ weakThis->m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(result);
+ });
}
-void PreconnectTask::continueCanAuthenticateAgainstProtectionSpace(bool result)
-{
- m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(result);
-}
-
void PreconnectTask::didFinish(const ResourceError& error)
{
if (m_completionHandler)
Modified: trunk/Source/WebKit/NetworkProcess/PreconnectTask.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/PreconnectTask.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/PreconnectTask.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -45,8 +45,6 @@
uint64_t frameID() const;
uint64_t pageID() const;
- void continueCanAuthenticateAgainstProtectionSpace(bool);
-
private:
// NetworkLoadClient.
bool isSynchronous() const final { return false; }
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -52,7 +52,7 @@
typedef uint64_t TaskIdentifier;
void didSendData(uint64_t totalBytesSent, uint64_t totalBytesExpectedToSend);
- void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
+ void didReceiveChallenge(WebCore::AuthenticationChallenge&&, ChallengeCompletionHandler&&);
void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&);
void didReceiveData(Ref<WebCore::SharedBuffer>&&);
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-08-15 20:15:57 UTC (rev 234896)
@@ -282,13 +282,13 @@
m_client->didSendData(totalBytesSent, totalBytesExpectedToSend);
}
-void NetworkDataTaskCocoa::didReceiveChallenge(const WebCore::AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler)
+void NetworkDataTaskCocoa::didReceiveChallenge(WebCore::AuthenticationChallenge&& challenge, ChallengeCompletionHandler&& completionHandler)
{
if (tryPasswordBasedAuthentication(challenge, completionHandler))
return;
if (m_client)
- m_client->didReceiveChallenge(challenge, WTFMove(completionHandler));
+ m_client->didReceiveChallenge(WTFMove(challenge), WTFMove(completionHandler));
else {
ASSERT_NOT_REACHED();
completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, { });
Modified: trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -307,7 +307,7 @@
});
}
-void NetworkDataTaskCurl::tryHttpAuthentication(const AuthenticationChallenge& challenge)
+void NetworkDataTaskCurl::tryHttpAuthentication(AuthenticationChallenge&& challenge)
{
if (!m_user.isNull() && !m_password.isNull()) {
auto persistence = m_storedCredentialsPolicy == WebCore::StoredCredentialsPolicy::Use ? WebCore::CredentialPersistenceForSession : WebCore::CredentialPersistenceNone;
@@ -339,7 +339,7 @@
}
}
- m_client->didReceiveChallenge(challenge, [this, protectedThis = makeRef(*this), challenge](AuthenticationChallengeDisposition disposition, const Credential& credential) {
+ m_client->didReceiveChallenge(AuthenticationChallenge(challenge), [this, protectedThis = makeRef(*this), ](AuthenticationChallengeDisposition disposition, const Credential& credential) {
if (m_state == State::Canceling || m_state == State::Completed)
return;
Modified: trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h 2018-08-15 20:15:57 UTC (rev 234896)
@@ -72,7 +72,7 @@
bool shouldRedirectAsGET(const WebCore::ResourceRequest&, bool crossOrigin);
void willPerformHTTPRedirection();
- void tryHttpAuthentication(const WebCore::AuthenticationChallenge&);
+ void tryHttpAuthentication(WebCore::AuthenticationChallenge&&);
void restartWithCredential(const WebCore::Credential&);
void appendCookieHeader(WebCore::ResourceRequest&);
Modified: trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp (234895 => 234896)
--- trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp 2018-08-15 19:44:27 UTC (rev 234895)
+++ trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp 2018-08-15 20:15:57 UTC (rev 234896)
@@ -520,7 +520,7 @@
void NetworkDataTaskSoup::continueAuthenticate(AuthenticationChallenge&& challenge)
{
- m_client->didReceiveChallenge(challenge, [this, protectedThis = makeRef(*this), challenge](AuthenticationChallengeDisposition disposition, const Credential& credential) {
+ m_client->didReceiveChallenge(AuthenticationChallenge(challenge), [this, protectedThis = makeRef(*this), challenge](AuthenticationChallengeDisposition disposition, const Credential& credential) {
if (m_state == State::Canceling || m_state == State::Completed) {
clearRequest();
return;