Changeset 240132 in webkit


Ignore:
Timestamp:
Jan 17, 2019, 2:54:23 PM (7 years ago)
Author:
Ross Kirsling
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r240129 r240132  
     12019-01-17  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Unreviewed WinCairo fix -- hundreds of tests crash after r240031.
     4
     5        * platform/network/curl/ResourceHandleCurl.cpp:
     6        (WebCore::ResourceHandle::createCurlRequest):
     7        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
     8        (WebCore::ResourceHandle::receivedCredential):
     9        (WebCore::ResourceHandle::getCredential):
     10
    1112019-01-17  John Wilander  <wilander@apple.com>
    212
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp

    r240032 r240132  
    146146        addCacheValidationHeaders(request);
    147147
    148         auto& storageSession = *context()->storageSession();
     148        auto& storageSession = NetworkStorageSession::defaultStorageSession();
    149149        auto& cookieJar = storageSession.cookieStorage();
    150150        auto includeSecureCookies = request.url().protocolIs("https") ? IncludeSecureCookies::Yes : IncludeSecureCookies::No;
     
    232232        if (challenge.failureResponse().httpStatusCode() == 401)
    233233            urlToStore = challenge.failureResponse().url();
    234         context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
     234        NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
    235235
    236236        restartRequestWithCredential(challenge.protectionSpace(), credential);
     
    247247            // There is a race condition here, since a different credential might have already been stored by another ResourceHandle,
    248248            // but the observable effect should be very minor, if any.
    249             context()->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace());
     249            NetworkStorageSession::defaultStorageSession().credentialStorage().remove(partition, challenge.protectionSpace());
    250250        }
    251251
    252252        if (!challenge.previousFailureCount()) {
    253             Credential credential = context()->storageSession()->credentialStorage().get(partition, challenge.protectionSpace());
     253            Credential credential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, challenge.protectionSpace());
    254254            if (!credential.isEmpty() && credential != d->m_initialCredential) {
    255255                ASSERT(credential.persistence() == CredentialPersistenceNone);
    256256                if (challenge.failureResponse().httpStatusCode() == 401) {
    257257                    // Store the credential back, possibly adding it as a default for this directory.
    258                     context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
     258                    NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
    259259                }
    260260
     
    290290        if (challenge.failureResponse().httpStatusCode() == 401) {
    291291            URL urlToStore = challenge.failureResponse().url();
    292             context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
     292            NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
    293293        }
    294294    }
     
    347347            // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
    348348            // try and reuse the credential preemptively, as allowed by RFC 2617.
    349             d->m_initialCredential = context()->storageSession()->credentialStorage().get(partition, request.url());
     349            d->m_initialCredential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, request.url());
    350350        } else if (!redirect) {
    351351            // If there is already a protection space known for the URL, update stored credentials
     
    353353            // XMLHttpRequest with known incorrect credentials, and aborting it immediately (so that
    354354            // an authentication dialog doesn't pop up).
    355             context()->storageSession()->credentialStorage().set(partition, credential, request.url());
     355            NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, request.url());
    356356        }
    357357    }
Note: See TracChangeset for help on using the changeset viewer.