Title: [240132] trunk/Source/WebCore
Revision
240132
Author
ross.kirsl...@sony.com
Date
2019-01-17 14:54:23 -0800 (Thu, 17 Jan 2019)

Log Message

Unreviewed WinCairo fix -- hundreds of tests crash after r240031.

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240131 => 240132)


--- trunk/Source/WebCore/ChangeLog	2019-01-17 21:45:07 UTC (rev 240131)
+++ trunk/Source/WebCore/ChangeLog	2019-01-17 22:54:23 UTC (rev 240132)
@@ -1,3 +1,13 @@
+2019-01-17  Ross Kirsling  <ross.kirsl...@sony.com>
+
+        Unreviewed WinCairo fix -- hundreds of tests crash after r240031.
+
+        * platform/network/curl/ResourceHandleCurl.cpp:
+        (WebCore::ResourceHandle::createCurlRequest):
+        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::receivedCredential):
+        (WebCore::ResourceHandle::getCredential):
+
 2019-01-17  John Wilander  <wilan...@apple.com>
 
         Add infrastructure to enable/disable ITP Debug Mode through Preferences

Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp (240131 => 240132)


--- trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2019-01-17 21:45:07 UTC (rev 240131)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2019-01-17 22:54:23 UTC (rev 240132)
@@ -145,7 +145,7 @@
     if (status == RequestStatus::NewRequest) {
         addCacheValidationHeaders(request);
 
-        auto& storageSession = *context()->storageSession();
+        auto& storageSession = NetworkStorageSession::defaultStorageSession();
         auto& cookieJar = storageSession.cookieStorage();
         auto includeSecureCookies = request.url().protocolIs("https") ? IncludeSecureCookies::Yes : IncludeSecureCookies::No;
         String cookieHeaderField = cookieJar.cookieRequestHeaderFieldValue(storageSession, request.firstPartyForCookies(), SameSiteInfo::create(request), request.url(), WTF::nullopt, WTF::nullopt, includeSecureCookies).first;
@@ -231,7 +231,7 @@
         URL urlToStore;
         if (challenge.failureResponse().httpStatusCode() == 401)
             urlToStore = challenge.failureResponse().url();
-        context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
+        NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
 
         restartRequestWithCredential(challenge.protectionSpace(), credential);
 
@@ -246,16 +246,16 @@
             // The stored credential wasn't accepted, stop using it.
             // There is a race condition here, since a different credential might have already been stored by another ResourceHandle,
             // but the observable effect should be very minor, if any.
-            context()->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace());
+            NetworkStorageSession::defaultStorageSession().credentialStorage().remove(partition, challenge.protectionSpace());
         }
 
         if (!challenge.previousFailureCount()) {
-            Credential credential = context()->storageSession()->credentialStorage().get(partition, challenge.protectionSpace());
+            Credential credential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, challenge.protectionSpace());
             if (!credential.isEmpty() && credential != d->m_initialCredential) {
                 ASSERT(credential.persistence() == CredentialPersistenceNone);
                 if (challenge.failureResponse().httpStatusCode() == 401) {
                     // Store the credential back, possibly adding it as a default for this directory.
-                    context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
+                    NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
                 }
 
                 restartRequestWithCredential(challenge.protectionSpace(), credential);
@@ -289,7 +289,7 @@
     if (shouldUseCredentialStorage()) {
         if (challenge.failureResponse().httpStatusCode() == 401) {
             URL urlToStore = challenge.failureResponse().url();
-            context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
+            NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
         }
     }
 
@@ -346,13 +346,13 @@
         if (credential.isEmpty()) {
             // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, 
             // try and reuse the credential preemptively, as allowed by RFC 2617.
-            d->m_initialCredential = context()->storageSession()->credentialStorage().get(partition, request.url());
+            d->m_initialCredential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, request.url());
         } else if (!redirect) {
             // If there is already a protection space known for the URL, update stored credentials
             // before sending a request. This makes it possible to implement logout by sending an
             // XMLHttpRequest with known incorrect credentials, and aborting it immediately (so that
             // an authentication dialog doesn't pop up).
-            context()->storageSession()->credentialStorage().set(partition, credential, request.url());
+            NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, request.url());
         }
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to