Title: [240295] trunk/Source
Revision
240295
Author
[email protected]
Date
2019-01-22 13:52:10 -0800 (Tue, 22 Jan 2019)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240294 => 240295)


--- trunk/Source/WebCore/ChangeLog	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebCore/ChangeLog	2019-01-22 21:52:10 UTC (rev 240295)
@@ -1,5 +1,16 @@
 2019-01-22  Alex Christensen  <[email protected]>
 
+        Fix some builds after r240292
+        https://bugs.webkit.org/show_bug.cgi?id=193580
+
+        * platform/network/curl/ResourceHandleCurl.cpp:
+        (WebCore::ResourceHandle::createCurlRequest):
+        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::receivedCredential):
+        (WebCore::ResourceHandle::getCredential):
+
+2019-01-22  Alex Christensen  <[email protected]>
+
         Move NetworkStorageSession ownership to NetworkProcess
         https://bugs.webkit.org/show_bug.cgi?id=193580
 

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


--- trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2019-01-22 21:52:10 UTC (rev 240295)
@@ -145,7 +145,7 @@
     if (status == RequestStatus::NewRequest) {
         addCacheValidationHeaders(request);
 
-        auto& storageSession = *d->m_context->storageSession(PAL::SessionID::defaultSessionID());
+        auto& storageSession = *d->m_context->storageSession();
         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();
-        d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
+        d->m_context->storageSession()->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.
-            d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().remove(partition, challenge.protectionSpace());
+            d->m_context->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace());
         }
 
         if (!challenge.previousFailureCount()) {
-            Credential credential = d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().get(partition, challenge.protectionSpace());
+            Credential credential = d->m_context->storageSession()->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.
-                    d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
+                    d->m_context->storageSession()->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();
-            d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);
+            d->m_context->storageSession()->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 = d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().get(partition, request.url());
+            d->m_initialCredential = d->m_context->storageSession()->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).
-            d->m_context->storageSession(PAL::SessionID::defaultSessionID())->credentialStorage().set(partition, credential, request.url());
+            d->m_context->storageSession()->credentialStorage().set(partition, credential, request.url());
         }
     }
 

Modified: trunk/Source/WebKit/ChangeLog (240294 => 240295)


--- trunk/Source/WebKit/ChangeLog	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebKit/ChangeLog	2019-01-22 21:52:10 UTC (rev 240295)
@@ -1,3 +1,13 @@
+2019-01-22  Alex Christensen  <[email protected]>
+
+        Fix some builds after r240292
+        https://bugs.webkit.org/show_bug.cgi?id=193580
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::switchToNewTestingSession):
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::Cache::retrieve):
+
 2019-01-22  Brian Burg  <[email protected]>
 
         Automation.computeElementLayout should return visual viewport-aware coordinates

Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (240294 => 240295)


--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2019-01-22 21:52:10 UTC (rev 240295)
@@ -470,12 +470,12 @@
 
 void NetworkProcess::switchToNewTestingSession()
 {
+#if PLATFORM(COCOA)
     // 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>).
     String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID()));
 
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
 
-#if PLATFORM(COCOA)
     RetainPtr<CFHTTPCookieStorageRef> cookieStorage;
     if (WebCore::NetworkStorageSession::processMayUseCookieAPI()) {
         ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp (240294 => 240295)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2019-01-22 21:52:10 UTC (rev 240295)
@@ -317,7 +317,7 @@
     }
 #endif
 
-    m_storage->retrieve(storageKey, priority, [this, protectedThis = makeRef(*this), request, completionHandler = WTFMove(completionHandler), info = WTFMove(info), storageKey, frameID](auto record, auto timings) mutable {
+    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 {
         info.storageTimings = timings;
 
         if (!record) {
@@ -334,7 +334,7 @@
 
         auto entry = Entry::decodeStorageRecord(*record);
 
-        auto useDecision = entry ? makeUseDecision(networkProcess(), *entry, request) : UseDecision::NoDueToDecodeFailure;
+        auto useDecision = entry ? makeUseDecision(networkProcess, *entry, request) : UseDecision::NoDueToDecodeFailure;
         switch (useDecision) {
         case UseDecision::Use:
             break;

Modified: trunk/Source/WebKitLegacy/ChangeLog (240294 => 240295)


--- trunk/Source/WebKitLegacy/ChangeLog	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebKitLegacy/ChangeLog	2019-01-22 21:52:10 UTC (rev 240295)
@@ -1,5 +1,12 @@
 2019-01-22  Alex Christensen  <[email protected]>
 
+        Fix some builds after r240292
+        https://bugs.webkit.org/show_bug.cgi?id=193580
+
+        * WebCoreSupport/NetworkStorageSessionMap.cpp:
+
+2019-01-22  Alex Christensen  <[email protected]>
+
         Move NetworkStorageSession ownership to NetworkProcess
         https://bugs.webkit.org/show_bug.cgi?id=193580
 

Modified: trunk/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp (240294 => 240295)


--- trunk/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp	2019-01-22 21:45:07 UTC (rev 240294)
+++ trunk/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp	2019-01-22 21:52:10 UTC (rev 240295)
@@ -27,6 +27,7 @@
 
 #include <WebCore/NetworkStorageSession.h>
 #include <pal/SessionID.h>
+#include <wtf/MainThread.h>
 #include <wtf/ProcessID.h>
 #include <wtf/ProcessPrivilege.h>
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to