[Curl] Unreviewed build fix for r240292 and friends.
authorross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 02:50:13 +0000 (02:50 +0000)
committerross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 02:50:13 +0000 (02:50 +0000)
WinCairo test stability must be restored in subsequent patch.

Source/WebKit:

* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
(WebKit::NetworkProcess::setNetworkProxySettings):

Source/WebKitLegacy:

* WebCoreSupport/NetworkStorageSessionMap.cpp:
(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::switchToNewTestingSession):
(NetworkStorageSessionMap::ensureSession):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240403 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp

index 53407f4..6c1b6f6 100644 (file)
@@ -1,3 +1,13 @@
+2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [Curl] Unreviewed build fix for r240292 and friends.
+
+        WinCairo test stability must be restored in subsequent patch.
+
+        * NetworkProcess/curl/NetworkProcessCurl.cpp:
+        (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
+        (WebKit::NetworkProcess::setNetworkProxySettings):
+
 2019-01-23  Alex Christensen  <achristensen@webkit.org>
 
         Stop using NetworkProcess::singleton
index fd5d6e5..91ffa49 100644 (file)
@@ -41,7 +41,7 @@ void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreati
 
 std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const
 {
-    return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), CurlContext::singleton());
+    return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
 }
 
 void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host)
@@ -88,7 +88,7 @@ void NetworkProcess::platformProcessDidTransitionToBackground()
 
 void NetworkProcess::setNetworkProxySettings(PAL::SessionID sessionID, WebCore::CurlProxySettings&& settings)
 {
-    if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
+    if (auto* networkStorageSession = storageSession(sessionID))
         networkStorageSession->setProxySettings(WTFMove(settings));
     else
         ASSERT_NOT_REACHED();
index 87fe8c3..c8e6dd9 100644 (file)
@@ -1,3 +1,14 @@
+2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [Curl] Unreviewed build fix for r240292 and friends.
+
+        WinCairo test stability must be restored in subsequent patch.
+
+        * WebCoreSupport/NetworkStorageSessionMap.cpp:
+        (NetworkStorageSessionMap::defaultStorageSession):
+        (NetworkStorageSessionMap::switchToNewTestingSession):
+        (NetworkStorageSessionMap::ensureSession):
+
 2019-01-22  Alex Christensen  <achristensen@webkit.org>
 
         Fix some builds after r240292
index 4eca34d..fdb1b24 100644 (file)
@@ -53,13 +53,19 @@ WebCore::NetworkStorageSession* NetworkStorageSessionMap::storageSession(const P
 
 WebCore::NetworkStorageSession& NetworkStorageSessionMap::defaultStorageSession()
 {
-    if (!defaultNetworkStorageSession())
+    if (!defaultNetworkStorageSession()) {
+#if USE(CURL)
+        defaultNetworkStorageSession() = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
+#else
         defaultNetworkStorageSession() = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID());
+#endif
+    }
     return *defaultNetworkStorageSession();
 }
 
 void NetworkStorageSessionMap::switchToNewTestingSession()
 {
+#if USE(CFURLCONNECTION)
     // 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()));
 
@@ -73,10 +79,12 @@ void NetworkStorageSessionMap::switchToNewTestingSession()
     }
 
     defaultNetworkStorageSession() = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), WTFMove(session), WTFMove(cookieStorage));
+#endif
 }
 
 void NetworkStorageSessionMap::ensureSession(const PAL::SessionID& sessionID, const String& identifierBase)
 {
+#if USE(CFURLCONNECTION)
     auto addResult = globalSessionMap().add(sessionID, nullptr);
     if (!addResult.isNewEntry)
         return;
@@ -97,6 +105,7 @@ void NetworkStorageSessionMap::ensureSession(const PAL::SessionID& sessionID, co
     }
 
     addResult.iterator->value = std::make_unique<WebCore::NetworkStorageSession>(sessionID, WTFMove(storageSession), WTFMove(cookieStorage));
+#endif
 }
 
 void NetworkStorageSessionMap::destroySession(const PAL::SessionID& sessionID)