Changeset 240295 in webkit


Ignore:
Timestamp:
Jan 22, 2019, 1:52:10 PM (7 years ago)
Author:
achristensen@apple.com
Message:

Fix some builds after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580

Source/WebCore:

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::switchToNewTestingSession):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::retrieve):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r240292 r240295  
     12019-01-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix some builds after r240292
     4        https://bugs.webkit.org/show_bug.cgi?id=193580
     5
     6        * platform/network/curl/ResourceHandleCurl.cpp:
     7        (WebCore::ResourceHandle::createCurlRequest):
     8        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
     9        (WebCore::ResourceHandle::receivedCredential):
     10        (WebCore::ResourceHandle::getCredential):
     11
    1122019-01-22  Alex Christensen  <achristensen@webkit.org>
    213
  • TabularUnified trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp

    r240292 r240295  
    146146        addCacheValidationHeaders(request);
    147147
    148         auto& storageSession = *d->m_context->storageSession(PAL::SessionID::defaultSessionID());
     148        auto& storageSession = *d->m_context->storageSession();
    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         d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
     234        d->m_context->storageSession()->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             d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().remove(partition, challenge.protectionSpace());
     249            d->m_context->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace());
    250250        }
    251251
    252252        if (!challenge.previousFailureCount()) {
    253             Credential credential = d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().get(partition, challenge.protectionSpace());
     253            Credential credential = d->m_context->storageSession()->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                     d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
     258                    d->m_context->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
    259259                }
    260260
     
    290290        if (challenge.failureResponse().httpStatusCode() == 401) {
    291291            URL urlToStore = challenge.failureResponse().url();
    292             d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
     292            d->m_context->storageSession()->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 = d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().get(partition, request.url());
     349            d->m_initialCredential = d->m_context->storageSession()->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             d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, request.url());
     355            d->m_context->storageSession()->credentialStorage().set(partition, credential, request.url());
    356356        }
    357357    }
  • TabularUnified trunk/Source/WebKit/ChangeLog

    r240294 r240295  
     12019-01-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix some builds after r240292
     4        https://bugs.webkit.org/show_bug.cgi?id=193580
     5
     6        * NetworkProcess/NetworkProcess.cpp:
     7        (WebKit::NetworkProcess::switchToNewTestingSession):
     8        * NetworkProcess/cache/NetworkCache.cpp:
     9        (WebKit::NetworkCache::Cache::retrieve):
     10
    1112019-01-22  Brian Burg  <bburg@apple.com>
    212
  • TabularUnified trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp

    r240292 r240295  
    471471void NetworkProcess::switchToNewTestingSession()
    472472{
     473#if PLATFORM(COCOA)
    473474    // Session name should be short enough for shared memory region name to be under the limit, otehrwise sandbox rules won't work (see <rdar://problem/13642852>).
    474475    String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID()));
     
    476477    auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
    477478
    478 #if PLATFORM(COCOA)
    479479    RetainPtr<CFHTTPCookieStorageRef> cookieStorage;
    480480    if (WebCore::NetworkStorageSession::processMayUseCookieAPI()) {
  • TabularUnified trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp

    r240292 r240295  
    318318#endif
    319319
    320     m_storage->retrieve(storageKey, priority, [this, protectedThis = makeRef(*this), request, completionHandler = WTFMove(completionHandler), info = WTFMove(info), storageKey, frameID](auto record, auto timings) mutable {
     320    m_storage->retrieve(storageKey, priority, [this, protectedThis = makeRef(*this), request, completionHandler = WTFMove(completionHandler), info = WTFMove(info), storageKey, frameID, networkProcess = makeRef(networkProcess())](auto record, auto timings) mutable {
    321321        info.storageTimings = timings;
    322322
     
    335335        auto entry = Entry::decodeStorageRecord(*record);
    336336
    337         auto useDecision = entry ? makeUseDecision(networkProcess(), *entry, request) : UseDecision::NoDueToDecodeFailure;
     337        auto useDecision = entry ? makeUseDecision(networkProcess, *entry, request) : UseDecision::NoDueToDecodeFailure;
    338338        switch (useDecision) {
    339339        case UseDecision::Use:
  • TabularUnified trunk/Source/WebKitLegacy/ChangeLog

    r240292 r240295  
     12019-01-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix some builds after r240292
     4        https://bugs.webkit.org/show_bug.cgi?id=193580
     5
     6        * WebCoreSupport/NetworkStorageSessionMap.cpp:
     7
    182019-01-22  Alex Christensen  <achristensen@webkit.org>
    29
  • TabularUnified trunk/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp

    r240292 r240295  
    2828#include <WebCore/NetworkStorageSession.h>
    2929#include <pal/SessionID.h>
     30#include <wtf/MainThread.h>
    3031#include <wtf/ProcessID.h>
    3132#include <wtf/ProcessPrivilege.h>
Note: See TracChangeset for help on using the changeset viewer.