Layout Test http/tests/cache-storage/cache-records-persistency.https.html is failing
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Sep 2019 20:49:49 +0000 (20:49 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Sep 2019 20:49:49 +0000 (20:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202323

Reviewed by Tim Horton.

This reverts most of r250351.
It turns out NetworkProcessProxy::addSession has some side effects in the UIProcess that are useful for NetworkProcess resumption after crashes.  Let's keep that.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
Source/WebKit/UIProcess/WebProcessPool.cpp

index 7cdb229..1e9cf3d 100644 (file)
@@ -1,3 +1,22 @@
+2019-09-27  Alex Christensen  <achristensen@webkit.org>
+
+        Layout Test http/tests/cache-storage/cache-records-persistency.https.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=202323
+
+        Reviewed by Tim Horton.
+
+        This reverts most of r250351.
+        It turns out NetworkProcessProxy::addSession has some side effects in the UIProcess that are useful for NetworkProcess resumption after crashes.  Let's keep that.
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        * NetworkProcess/NetworkProcessCreationParameters.cpp:
+        (WebKit::NetworkProcessCreationParameters::encode const):
+        (WebKit::NetworkProcessCreationParameters::decode):
+        * NetworkProcess/NetworkProcessCreationParameters.h:
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::ensureNetworkProcess):
+
 2019-09-27  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed build-fix: wrap the AssertionServicesSPI.h in an IOS_FAMILY check.
index 8e66646..86a3e94 100644 (file)
@@ -322,8 +322,6 @@ void NetworkProcess::initializeNetworkProcess(NetworkProcessCreationParameters&&
 
     auto sessionID = parameters.defaultDataStoreParameters.networkSessionParameters.sessionID;
     setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters)));
-    for (auto&& parameters : WTFMove(parameters.nonDefaultDataStoreParameters))
-        addWebsiteDataStore(WTFMove(parameters));
 
 #if ENABLE(INDEXED_DATABASE)
     addIndexedDatabaseSession(sessionID, parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle);
index 92abc72..583504d 100644 (file)
@@ -62,7 +62,6 @@ void NetworkProcessCreationParameters::encode(IPC::Encoder& encoder) const
     encoder << suppressesConnectionTerminationOnSystemChange;
 #endif
     encoder << defaultDataStoreParameters;
-    encoder << nonDefaultDataStoreParameters;
 #if USE(SOUP)
     encoder.encodeEnum(cookieAcceptPolicy);
     encoder << ignoreTLSErrors;
@@ -146,12 +145,6 @@ bool NetworkProcessCreationParameters::decode(IPC::Decoder& decoder, NetworkProc
         return false;
     result.defaultDataStoreParameters = WTFMove(*defaultDataStoreParameters);
 
-    Optional<Vector<WebsiteDataStoreParameters>> nonDefaultDataStoreParameters;
-    decoder >> nonDefaultDataStoreParameters;
-    if (!nonDefaultDataStoreParameters)
-        return false;
-    result.nonDefaultDataStoreParameters = WTFMove(*nonDefaultDataStoreParameters);
-    
 #if USE(SOUP)
     if (!decoder.decodeEnum(result.cookieAcceptPolicy))
         return false;
index 2d35020..96e73c2 100644 (file)
@@ -78,7 +78,6 @@ struct NetworkProcessCreationParameters {
 #endif
 
     WebsiteDataStoreParameters defaultDataStoreParameters;
-    Vector<WebsiteDataStoreParameters> nonDefaultDataStoreParameters;
     
 #if USE(SOUP)
     HTTPCookieAcceptPolicy cookieAcceptPolicy { HTTPCookieAcceptPolicy::AlwaysAccept };
index 179f2eb..9b22366 100644 (file)
@@ -629,12 +629,6 @@ NetworkProcessProxy& WebProcessPool::ensureNetworkProcess(WebsiteDataStore* with
     // Add any platform specific parameters
     platformInitializeNetworkProcess(parameters);
 
-    // Make sure the network process knows about all the sessions that have been registered before it started.
-    for (auto& sessionID : m_sessionToPageIDsMap.keys()) {
-        if (auto* websiteDataStore = WebsiteDataStore::existingNonDefaultDataStoreForSessionID(sessionID))
-            parameters.nonDefaultDataStoreParameters.append(websiteDataStore->parameters());
-    }
-
     // Initialize the network process.
     networkProcess->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);
 
@@ -652,6 +646,12 @@ NetworkProcessProxy& WebProcessPool::ensureNetworkProcess(WebsiteDataStore* with
         withWebsiteDataStore->clearPendingCookies();
     }
 
+    // Make sure the network process knows about all the sessions that have been registered before it started.
+    for (auto& sessionID : m_sessionToPageIDsMap.keys()) {
+        if (auto* websiteDataStore = WebsiteDataStore::existingNonDefaultDataStoreForSessionID(sessionID))
+            networkProcess->addSession(*websiteDataStore);
+    }
+
     m_networkProcess = WTFMove(networkProcess);
     return *m_networkProcess;
 }