Title: [224111] branches/safari-604-branch/Source/WebKit
- Revision
- 224111
- Author
- [email protected]
- Date
- 2017-10-27 08:35:42 -0700 (Fri, 27 Oct 2017)
Log Message
Cherry-pick r223993. rdar://problem/34771415
Modified Paths
Diff
Modified: branches/safari-604-branch/Source/WebKit/ChangeLog (224110 => 224111)
--- branches/safari-604-branch/Source/WebKit/ChangeLog 2017-10-27 14:38:41 UTC (rev 224110)
+++ branches/safari-604-branch/Source/WebKit/ChangeLog 2017-10-27 15:35:42 UTC (rev 224111)
@@ -1,3 +1,33 @@
+2017-10-27 Jason Marcell <[email protected]>
+
+ Cherry-pick r223993. rdar://problem/34771415
+
+ 2017-10-25 Per Arne Vollan <[email protected]>
+
+ Network process crash under WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge.
+ https://bugs.webkit.org/show_bug.cgi?id=160234
+ rdar://problem/30675510
+
+ Reviewed by Geoffrey Garen.
+
+ An exception is raised because we call the method rejectProtectionSpaceAndContinueWithChallenge on the CFNetwork
+ challenge sender, which does not implement this optional method. The methods on the authentication challenge
+ sender are deprecated when network session is used, so we should not call them in that case.
+
+ * Shared/Authentication/AuthenticationManager.cpp:
+ (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
+ (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
+ (WebKit::AuthenticationManager::cancelSingleChallenge):
+ (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
+ (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
+ * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
+ (WebKit::AuthenticationManager::receivedCredential):
+ (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+ (WebKit::AuthenticationManager::receivedCancellation):
+ (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+ (WebKit::AuthenticationManager::receivedChallengeRejection):
+ * Shared/Authentication/soup/AuthenticationManagerSoup.cpp:
+
2017-10-20 Jason Marcell <[email protected]>
Cherry-pick r223708. rdar://problem/34771406
Modified: branches/safari-604-branch/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (224110 => 224111)
--- branches/safari-604-branch/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2017-10-27 14:38:41 UTC (rev 224110)
+++ branches/safari-604-branch/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2017-10-27 15:35:42 UTC (rev 224111)
@@ -227,12 +227,15 @@
completionHandler(AuthenticationChallengeDisposition::UseCredential, credential);
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedCredential(challenge.challenge, credential);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedCredential(challenge.challenge, credential);
+#endif
}
void AuthenticationManager::continueWithoutCredentialForChallenge(uint64_t challengeID)
@@ -255,12 +258,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedRequestToContinueWithoutCredential(challenge.challenge);
+#endif
}
void AuthenticationManager::cancelChallenge(uint64_t challengeID)
@@ -283,12 +289,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::Cancel, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedCancellation(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedCancellation(challenge.challenge);
+#endif
}
void AuthenticationManager::performDefaultHandling(uint64_t challengeID)
@@ -311,12 +320,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedRequestToPerformDefaultHandling(challenge.challenge);
+#endif
}
void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID)
@@ -339,12 +351,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedChallengeRejection(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedChallengeRejection(challenge.challenge);
+#endif
}
} // namespace WebKit
Modified: branches/safari-604-branch/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm (224110 => 224111)
--- branches/safari-604-branch/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm 2017-10-27 14:38:41 UTC (rev 224110)
+++ branches/safari-604-branch/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm 2017-10-27 15:35:42 UTC (rev 224111)
@@ -26,6 +26,7 @@
#import "config.h"
#import "AuthenticationManager.h"
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
using namespace WebCore;
namespace WebKit {
@@ -32,37 +33,28 @@
void AuthenticationManager::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
}
+#endif
Modified: branches/safari-604-branch/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp (224110 => 224111)
--- branches/safari-604-branch/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp 2017-10-27 14:38:41 UTC (rev 224110)
+++ branches/safari-604-branch/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp 2017-10-27 15:35:42 UTC (rev 224111)
@@ -26,6 +26,7 @@
#include "config.h"
#include "AuthenticationManager.h"
+#if !USE(NETWORK_SESSION)
using namespace WebCore;
namespace WebKit {
@@ -51,3 +52,4 @@
}
}
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes