Title: [290214] trunk
Revision
290214
Author
[email protected]
Date
2022-02-19 13:42:51 -0800 (Sat, 19 Feb 2022)

Log Message

Unreviewed, reverting r290196.

Caused Network Process crashes <rdar://89190571>

Reverted changeset:

"Add assertion that no two network sessions share the same
storage path"
https://bugs.webkit.org/show_bug.cgi?id=236844
https://commits.webkit.org/r290196

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (290213 => 290214)


--- trunk/Source/WebKit/ChangeLog	2022-02-19 21:16:01 UTC (rev 290213)
+++ trunk/Source/WebKit/ChangeLog	2022-02-19 21:42:51 UTC (rev 290214)
@@ -1,3 +1,16 @@
+2022-02-19  Chris Dumez  <[email protected]>
+
+        Unreviewed, reverting r290196.
+
+        Caused Network Process crashes <rdar://89190571>
+
+        Reverted changeset:
+
+        "Add assertion that no two network sessions share the same
+        storage path"
+        https://bugs.webkit.org/show_bug.cgi?id=236844
+        https://commits.webkit.org/r290196
+
 2022-02-19  Wenson Hsieh  <[email protected]>
 
         Unreviewed, fix the internal iOS build after r290154

Modified: trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp (290213 => 290214)


--- trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp	2022-02-19 21:16:01 UTC (rev 290213)
+++ trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp	2022-02-19 21:42:51 UTC (rev 290214)
@@ -108,12 +108,6 @@
         FileSystem::deleteFile(filePath);
 }
 
-static HashSet<String>& activePaths()
-{
-    static MainThreadNeverDestroyed<HashSet<String>> paths;
-    return paths;
-}
-
 Ref<NetworkStorageManager> NetworkStorageManager::create(PAL::SessionID sessionID, IPC::Connection::UniqueID connection, const String& path, const String& customLocalStoragePath, const String& customIDBStoragePath, const String& customCacheStoragePath, uint64_t defaultOriginQuota, uint64_t defaultThirdPartyOriginQuota, bool shouldUseCustomPaths)
 {
     return adoptRef(*new NetworkStorageManager(sessionID, connection, path, customLocalStoragePath, customIDBStoragePath, customCacheStoragePath, defaultOriginQuota, defaultThirdPartyOriginQuota, shouldUseCustomPaths));
@@ -128,12 +122,6 @@
 {
     ASSERT(RunLoop::isMain());
 
-    // Sessions are not supposed to share the same path, as each session runs on its own queue
-    // and this can cause corruption. If the assertion is hit, check if you create multiple
-    // WebsiteDataStores with the same generalStorageDirectory.
-    if (!path.isEmpty())
-        RELEASE_ASSERT(activePaths().add(path).isNewEntry);
-
     m_queue->dispatch([this, protectedThis = Ref { *this }, path = path.isolatedCopy(), customLocalStoragePath = crossThreadCopy(customLocalStoragePath), customIDBStoragePath = crossThreadCopy(customIDBStoragePath), customCacheStoragePath = crossThreadCopy(customCacheStoragePath), shouldUseCustomPaths]() mutable {
         m_fileSystemStorageHandleRegistry = makeUnique<FileSystemStorageHandleRegistry>();
         m_storageAreaRegistry = makeUnique<StorageAreaRegistry>();
@@ -154,9 +142,6 @@
 {
     ASSERT(RunLoop::isMain());
     ASSERT(m_closed);
-
-    if (!m_path.isEmpty())
-        activePaths().remove(m_path);
 }
 
 bool NetworkStorageManager::canHandleTypes(OptionSet<WebsiteDataType> types)

Modified: trunk/Tools/ChangeLog (290213 => 290214)


--- trunk/Tools/ChangeLog	2022-02-19 21:16:01 UTC (rev 290213)
+++ trunk/Tools/ChangeLog	2022-02-19 21:42:51 UTC (rev 290214)
@@ -1,3 +1,16 @@
+2022-02-19  Chris Dumez  <[email protected]>
+
+        Unreviewed, reverting r290196.
+
+        Caused Network Process crashes <rdar://89190571>
+
+        Reverted changeset:
+
+        "Add assertion that no two network sessions share the same
+        storage path"
+        https://bugs.webkit.org/show_bug.cgi?id=236844
+        https://commits.webkit.org/r290196
+
 2022-02-18  David Kilzer  <[email protected]>
 
         [Tools] Sanitizer builds should obey `set-webkit-configuration --force-optimization-level`

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (290213 => 290214)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2022-02-19 21:16:01 UTC (rev 290213)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2022-02-19 21:42:51 UTC (rev 290214)
@@ -614,7 +614,6 @@
         WKWebsiteDataStoreConfigurationSetMediaKeysStorageDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "MediaKeys", pathSeparator, randomNumber)).get());
         WKWebsiteDataStoreConfigurationSetResourceLoadStatisticsDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ResourceLoadStatistics", pathSeparator, randomNumber)).get());
         WKWebsiteDataStoreConfigurationSetServiceWorkerRegistrationDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ServiceWorkers", pathSeparator, randomNumber)).get());
-        WKWebsiteDataStoreConfigurationSetGeneralStorageDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "Default", pathSeparator, randomNumber)).get());
 #if PLATFORM(WIN)
         WKWebsiteDataStoreConfigurationSetCookieStorageFile(configuration, toWK(makeString(temporaryFolder, pathSeparator, "cookies", pathSeparator, randomNumber, pathSeparator, "cookiejar.db")).get());
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to