Title: [225914] trunk/Source/WebKit
Revision
225914
Author
[email protected]
Date
2017-12-14 11:13:56 -0800 (Thu, 14 Dec 2017)

Log Message

StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
https://bugs.webkit.org/show_bug.cgi?id=180784

Reviewed by Youenn Fablet.

StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
instead of not clearing anything when no such SWServer exists.

This will be useful on iOS once <rdar://problem/36034667> is fully fixed.

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (225913 => 225914)


--- trunk/Source/WebKit/ChangeLog	2017-12-14 19:11:49 UTC (rev 225913)
+++ trunk/Source/WebKit/ChangeLog	2017-12-14 19:13:56 UTC (rev 225914)
@@ -1,5 +1,23 @@
 2017-12-14  Chris Dumez  <[email protected]>
 
+        StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
+        https://bugs.webkit.org/show_bug.cgi?id=180784
+
+        Reviewed by Youenn Fablet.
+
+        StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
+        instead of not clearing anything when no such SWServer exists.
+
+        This will be useful on iOS once <rdar://problem/36034667> is fully fixed.
+
+        * StorageProcess/StorageProcess.cpp:
+        (WebKit::StorageProcess::deleteWebsiteData):
+        (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
+
+2017-12-14  Chris Dumez  <[email protected]>
+
         WebsiteDataStore::defaultDataStoreConfiguration() fails to set default value for serviceWorkerRegistrationDirectory
         https://bugs.webkit.org/show_bug.cgi?id=180794
         <rdar://problem/36034667>

Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (225913 => 225914)


--- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp	2017-12-14 19:11:49 UTC (rev 225913)
+++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp	2017-12-14 19:13:56 UTC (rev 225914)
@@ -301,10 +301,8 @@
     });
 
 #if ENABLE(SERVICE_WORKER)
-    if (websiteDataTypes.contains(WebsiteDataType::ServiceWorkerRegistrations)) {
-        if (auto* server = m_swServers.get(sessionID))
-            server->clearAll([callbackAggregator = callbackAggregator.copyRef()] { });
-    }
+    if (websiteDataTypes.contains(WebsiteDataType::ServiceWorkerRegistrations))
+        swServerForSession(sessionID).clearAll([callbackAggregator = callbackAggregator.copyRef()] { });
 #endif
 
 #if ENABLE(INDEXED_DATABASE)
@@ -321,10 +319,9 @@
 
 #if ENABLE(SERVICE_WORKER)
     if (websiteDataTypes.contains(WebsiteDataType::ServiceWorkerRegistrations)) {
-        if (auto* server = m_swServers.get(sessionID)) {
-            for (auto& originData : securityOriginDatas)
-                server->clear(originData.securityOrigin(), [callbackAggregator = callbackAggregator.copyRef()] { });
-        }
+        auto& server = swServerForSession(sessionID);
+        for (auto& originData : securityOriginDatas)
+            server.clear(originData.securityOrigin(), [callbackAggregator = callbackAggregator.copyRef()] { });
     }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to