Title: [228070] branches/safari-605-branch
Revision
228070
Author
jmarc...@apple.com
Date
2018-02-04 21:30:35 -0800 (Sun, 04 Feb 2018)

Log Message

Cherry-pick r228019. rdar://problem/37220144

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-05 05:30:35 UTC (rev 228070)
@@ -1,5 +1,45 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r228019. rdar://problem/37220144
+
+    2018-02-02  Youenn Fablet  <you...@apple.com>
+
+            Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
+            https://bugs.webkit.org/show_bug.cgi?id=182403
+
+            Reviewed by Alex Christensen.
+
+            WebsiteDataStore is the place to set configuration information such as service worker registration path.
+            This patch updates WebKit code accordingly.
+            By default, the service worker registration path is in a Caches subfolder, similarly to cache API path.
+
+            * UIProcess/API/APIProcessPoolConfiguration.cpp:
+            (API::ProcessPoolConfiguration::createWithLegacyOptions):
+            (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
+            (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
+            (API::ProcessPoolConfiguration::copy):
+            * UIProcess/API/APIProcessPoolConfiguration.h:
+            * UIProcess/API/C/WKContextConfigurationRef.cpp:
+            (WKContextConfigurationCopyServiceWorkerDatabaseDirectory): Deleted.
+            (WKContextConfigurationSetServiceWorkerDatabaseDirectory): Deleted.
+            * UIProcess/API/C/WKContextConfigurationRef.h:
+            * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
+            (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
+            * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+            (-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]):
+            (-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]):
+            * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
+            * UIProcess/WebProcessPool.cpp:
+            (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
+            (WebKit::WebProcessPool::initializeNewWebProcess):
+            * UIProcess/WebsiteData/WebsiteDataStore.h:
+            (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
+            (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
+            * UIProcess/gtk/WebProcessPoolGtk.cpp:
+            * UIProcess/gtk/WebProcessPoolWPE.cpp:
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227990. rdar://problem/37145451
 
     2018-02-01  David Kilzer  <ddkil...@apple.com>

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -49,7 +49,6 @@
     configuration->m_diskCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory();
     configuration->m_mediaCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory();
     configuration->m_indexedDBDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory();
-    configuration->m_serviceWorkerRegistrationDirectory = WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory();
     configuration->m_localStorageDirectory = WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory();
     configuration->m_mediaKeysStorageDirectory = WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory();
     configuration->m_webSQLDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory();
@@ -67,7 +66,6 @@
     configuration->m_diskCacheDirectory = legacyConfiguration.networkCacheDirectory;
     configuration->m_mediaCacheDirectory = legacyConfiguration.mediaCacheDirectory;
     configuration->m_indexedDBDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory();
-    configuration->m_serviceWorkerRegistrationDirectory = WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory();
     configuration->m_localStorageDirectory = legacyConfiguration.localStorageDirectory;
     configuration->m_mediaKeysStorageDirectory = legacyConfiguration.mediaKeysStorageDirectory;
     configuration->m_resourceLoadStatisticsDirectory = legacyConfiguration.resourceLoadStatisticsDirectory;
@@ -82,7 +80,6 @@
     , m_diskCacheDirectory(WebsiteDataStore::defaultNetworkCacheDirectory())
     , m_mediaCacheDirectory(WebsiteDataStore::defaultMediaCacheDirectory())
     , m_indexedDBDatabaseDirectory(WebsiteDataStore::defaultIndexedDBDatabaseDirectory())
-    , m_serviceWorkerRegistrationDirectory(WebsiteDataStore::defaultServiceWorkerRegistrationDirectory())
     , m_localStorageDirectory(WebsiteDataStore::defaultLocalStorageDirectory())
     , m_webSQLDatabaseDirectory(WebsiteDataStore::defaultWebSQLDatabaseDirectory())
     , m_mediaKeysStorageDirectory(WebsiteDataStore::defaultMediaKeysStorageDirectory())
@@ -109,7 +106,6 @@
     copy->m_applicationCacheFlatFileSubdirectoryName = this->m_applicationCacheFlatFileSubdirectoryName;
     copy->m_mediaCacheDirectory = this->m_mediaCacheDirectory;
     copy->m_indexedDBDatabaseDirectory = this->m_indexedDBDatabaseDirectory;
-    copy->m_serviceWorkerRegistrationDirectory = this->m_serviceWorkerRegistrationDirectory;
     copy->m_injectedBundlePath = this->m_injectedBundlePath;
     copy->m_localStorageDirectory = this->m_localStorageDirectory;
     copy->m_mediaKeysStorageDirectory = this->m_mediaKeysStorageDirectory;

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h	2018-02-05 05:30:35 UTC (rev 228070)
@@ -76,9 +76,6 @@
     const WTF::String& indexedDBDatabaseDirectory() const { return m_indexedDBDatabaseDirectory; }
     void setIndexedDBDatabaseDirectory(const WTF::String& indexedDBDatabaseDirectory) { m_indexedDBDatabaseDirectory = indexedDBDatabaseDirectory; }
 
-    const WTF::String& serviceWorkerRegistrationDirectory() const { return m_serviceWorkerRegistrationDirectory; }
-    void setServiceWorkerRegistrationDirectory(const WTF::String& directory) { m_serviceWorkerRegistrationDirectory = directory; }
-    
     const WTF::String& injectedBundlePath() const { return m_injectedBundlePath; }
     void setInjectedBundlePath(const WTF::String& injectedBundlePath) { m_injectedBundlePath = injectedBundlePath; }
 
@@ -151,7 +148,6 @@
     WTF::String m_diskCacheDirectory;
     WTF::String m_mediaCacheDirectory;
     WTF::String m_indexedDBDatabaseDirectory;
-    WTF::String m_serviceWorkerRegistrationDirectory;
     WTF::String m_injectedBundlePath;
     WTF::String m_localStorageDirectory;
     WTF::String m_webSQLDatabaseDirectory;

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -78,16 +78,6 @@
     toImpl(configuration)->setIndexedDBDatabaseDirectory(toImpl(indexedDBDatabaseDirectory)->string());
 }
 
-WKStringRef WKContextConfigurationCopyServiceWorkerDatabaseDirectory(WKContextConfigurationRef configuration)
-{
-    return toCopiedAPI(toImpl(configuration)->serviceWorkerRegistrationDirectory());
-}
-
-void WKContextConfigurationSetServiceWorkerDatabaseDirectory(WKContextConfigurationRef configuration, WKStringRef swDatabaseDirectory)
-{
-    toImpl(configuration)->setServiceWorkerRegistrationDirectory(toImpl(swDatabaseDirectory)->string());
-}
-
 WKStringRef WKContextConfigurationCopyInjectedBundlePath(WKContextConfigurationRef configuration)
 {
     return toCopiedAPI(toImpl(configuration)->injectedBundlePath());

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h	2018-02-05 05:30:35 UTC (rev 228070)
@@ -44,9 +44,6 @@
 WK_EXPORT WKStringRef WKContextConfigurationCopyIndexedDBDatabaseDirectory(WKContextConfigurationRef configuration);
 WK_EXPORT void WKContextConfigurationSetIndexedDBDatabaseDirectory(WKContextConfigurationRef configuration, WKStringRef indexedDBDatabaseDirectory);
 
-WK_EXPORT WKStringRef WKContextConfigurationCopyServiceWorkerDatabaseDirectory(WKContextConfigurationRef configuration);
-WK_EXPORT void WKContextConfigurationSetServiceWorkerDatabaseDirectory(WKContextConfigurationRef configuration, WKStringRef swDatabaseDirectory);
-
 WK_EXPORT WKStringRef WKContextConfigurationCopyInjectedBundlePath(WKContextConfigurationRef configuration);
 WK_EXPORT void WKContextConfigurationSetInjectedBundlePath(WKContextConfigurationRef configuration, WKStringRef injectedBundlePath);
 

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm	2018-02-05 05:30:35 UTC (rev 228070)
@@ -74,7 +74,7 @@
 
 String WebsiteDataStore::defaultServiceWorkerRegistrationDirectory()
 {
-    return websiteDataDirectoryFileSystemRepresentation("ServiceWorkers");
+    return cacheDirectoryFileSystemRepresentation("ServiceWorkers");
 }
 
 String WebsiteDataStore::defaultLocalStorageDirectory()

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-05 05:30:35 UTC (rev 228070)
@@ -254,6 +254,16 @@
     _websiteDataStore->websiteDataStore().setCacheStorageDirectory(directory);
 }
 
+- (NSString *)_serviceWorkerRegistrationDirectory
+{
+    return _websiteDataStore->websiteDataStore().serviceWorkerRegistrationDirectory();
+}
+
+- (void)_setServiceWorkerRegistrationDirectory:(NSString *)directory
+{
+    _websiteDataStore->websiteDataStore().setServiceWorkerRegistrationDirectory(directory);
+}
+
 - (void)_setBoundInterfaceIdentifier:(NSString *)identifier
 {
     _websiteDataStore->websiteDataStore().setBoundInterfaceIdentifier(identifier);

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2018-02-05 05:30:35 UTC (rev 228070)
@@ -47,6 +47,7 @@
 @property (nonatomic, setter=_setResourceLoadStatisticsEnabled:) BOOL _resourceLoadStatisticsEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0));
 @property (nonatomic, setter=_setCacheStoragePerOriginQuota:) NSUInteger _cacheStoragePerOriginQuota WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setCacheStorageDirectory:) NSString* _cacheStorageDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setServiceWorkerRegistrationDirectory:) NSString* _serviceWorkerRegistrationDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 @property (nonatomic, setter=_setBoundInterfaceIdentifier:) NSString *_boundInterfaceIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setAllowsCellularAccess:) BOOL _allowsCellularAccess WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2018-02-05 05:30:35 UTC (rev 228070)
@@ -399,16 +399,6 @@
     return FileSystem::pathByAppendingComponent(legacyPlatformDefaultWebSQLDatabaseDirectory(), "___IndexedDB");
 }
 
-String WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory()
-{
-    registerUserDefaultsIfNeeded();
-
-    NSString *directory = [[NSUserDefaults standardUserDefaults] objectForKey:WebServiceWorkerRegistrationDirectoryDefaultsKey];
-    if (!directory || ![directory isKindOfClass:[NSString class]])
-        directory = @"~/Library/WebKit/ServiceWorkers";
-    return stringByResolvingSymlinksInPath([directory stringByStandardizingPath]);
-}
-
 String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
 {
     registerUserDefaultsIfNeeded();

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.cpp (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -555,7 +555,7 @@
 #endif
 #if ENABLE(SERVICE_WORKER)
         if (parameters.serviceWorkerRegistrationDirectory.isEmpty()) {
-            parameters.serviceWorkerRegistrationDirectory = m_configuration->serviceWorkerRegistrationDirectory();
+            parameters.serviceWorkerRegistrationDirectory = API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory();
             SandboxExtension::createHandleForReadWriteDirectory(parameters.serviceWorkerRegistrationDirectory, parameters.serviceWorkerRegistrationDirectoryExtensionHandle);
         }
 
@@ -816,7 +816,10 @@
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    parameters.hasRegisteredServiceWorkers = ServiceWorkerProcessProxy::hasRegisteredServiceWorkers(m_configuration->serviceWorkerRegistrationDirectory());
+    String serviceWorkerRegistrationDirectory = websiteDataStore.resolvedServiceWorkerRegistrationDirectory();
+    if (serviceWorkerRegistrationDirectory.isEmpty())
+        serviceWorkerRegistrationDirectory = API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory();
+    parameters.hasRegisteredServiceWorkers = ServiceWorkerProcessProxy::hasRegisteredServiceWorkers(serviceWorkerRegistrationDirectory);
 #endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.h (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.h	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessPool.h	2018-02-05 05:30:35 UTC (rev 228070)
@@ -393,7 +393,6 @@
     // FIXME: Move these to API::WebsiteDataStore.
     static String legacyPlatformDefaultLocalStorageDirectory();
     static String legacyPlatformDefaultIndexedDBDatabaseDirectory();
-    static String legacyPlatformDefaultServiceWorkerRegistrationDirectory();
     static String legacyPlatformDefaultWebSQLDatabaseDirectory();
     static String legacyPlatformDefaultMediaKeysStorageDirectory();
     static String legacyPlatformDefaultMediaCacheDirectory();

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h	2018-02-05 05:30:35 UTC (rev 228070)
@@ -105,6 +105,8 @@
     void setCacheStoragePerOriginQuota(uint64_t quota) { m_resolvedConfiguration.cacheStoragePerOriginQuota = quota; }
     const String& cacheStorageDirectory() const { return m_resolvedConfiguration.cacheStorageDirectory; }
     void setCacheStorageDirectory(String&& directory) { m_resolvedConfiguration.cacheStorageDirectory = WTFMove(directory); }
+    const String& serviceWorkerRegistrationDirectory() const { return m_resolvedConfiguration.serviceWorkerRegistrationDirectory; }
+    void setServiceWorkerRegistrationDirectory(String&& directory) { m_resolvedConfiguration.serviceWorkerRegistrationDirectory = WTFMove(directory); }
 
     WebResourceLoadStatisticsStore* resourceLoadStatistics() const { return m_resourceLoadStatistics.get(); }
     void clearResourceLoadStatisticsInWebProcesses();

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -106,11 +106,6 @@
     return API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory();
 }
 
-String WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory()
-{
-    return API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory();
-}
-
 String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
 {
     return API::WebsiteDataStore::defaultLocalStorageDirectory();

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp (228069 => 228070)


--- branches/safari-605-branch/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -111,13 +111,6 @@
     return WebCore::FileSystem::stringFromFileSystemRepresentation(indexedDBDatabaseDirectory.get());
 }
 
-String WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory()
-{
-    // FIXME: Implement when implementing ServiceWorkers
-    notImplemented();
-    return String();
-}
-
 String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
 {
     GUniquePtr<gchar> storageDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "localstorage", nullptr));

Modified: branches/safari-605-branch/Tools/ChangeLog (228069 => 228070)


--- branches/safari-605-branch/Tools/ChangeLog	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Tools/ChangeLog	2018-02-05 05:30:35 UTC (rev 228070)
@@ -1,5 +1,21 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r228019. rdar://problem/37220144
+
+    2018-02-02  Youenn Fablet  <you...@apple.com>
+
+            Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
+            https://bugs.webkit.org/show_bug.cgi?id=182403
+
+            Reviewed by Alex Christensen.
+
+            * WebKitTestRunner/TestController.cpp:
+            (WTR::TestController::generateContextConfiguration const):
+            * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+            (WTR::initializeWebViewConfiguration):
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227948. rdar://problem/37145473
 
     2018-01-31  Per Arne Vollan  <pvol...@apple.com>

Modified: branches/safari-605-branch/Tools/WebKitTestRunner/TestController.cpp (228069 => 228070)


--- branches/safari-605-branch/Tools/WebKitTestRunner/TestController.cpp	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Tools/WebKitTestRunner/TestController.cpp	2018-02-05 05:30:35 UTC (rev 228070)
@@ -411,7 +411,6 @@
         WKContextConfigurationSetApplicationCacheDirectory(configuration.get(), toWK(temporaryFolder + separator + "ApplicationCache").get());
         WKContextConfigurationSetDiskCacheDirectory(configuration.get(), toWK(temporaryFolder + separator + "Cache").get());
         WKContextConfigurationSetIndexedDBDatabaseDirectory(configuration.get(), toWK(temporaryFolder + separator + "Databases" + separator + "IndexedDB").get());
-        WKContextConfigurationSetServiceWorkerDatabaseDirectory(configuration.get(), toWK(temporaryFolder + separator + "ServiceWorkers").get());
         WKContextConfigurationSetLocalStorageDirectory(configuration.get(), toWK(temporaryFolder + separator + "LocalStorage").get());
         WKContextConfigurationSetWebSQLDatabaseDirectory(configuration.get(), toWK(temporaryFolder + separator + "Databases" + separator + "WebSQL").get());
         WKContextConfigurationSetMediaKeysStorageDirectory(configuration.get(), toWK(temporaryFolder + separator + "MediaKeys").get());

Modified: branches/safari-605-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (228069 => 228070)


--- branches/safari-605-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-02-05 05:30:30 UTC (rev 228069)
+++ branches/safari-605-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-02-05 05:30:35 UTC (rev 228070)
@@ -86,6 +86,9 @@
     if (libraryPath) {
         String cacheStorageDirectory = String(libraryPath) + '/' + "CacheStorage";
         [poolWebsiteDataStore _setCacheStorageDirectory: cacheStorageDirectory];
+
+        String serviceWorkerRegistrationDirectory = String(libraryPath) + '/' + "ServiceWorkers";
+        [poolWebsiteDataStore _setServiceWorkerRegistrationDirectory: serviceWorkerRegistrationDirectory];
     }
 
     [globalWebViewConfiguration.websiteDataStore _setResourceLoadStatisticsEnabled:YES];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to