WebKit Bugzilla
Attachment 358333 Details for
Bug 193114
: Use WebsiteDataStoreParameters instead of NetworkProcessCreationParameters for IndexedDB directories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193114-20190104103819.patch (text/plain), 10.76 KB, created by
Alex Christensen
on 2019-01-04 10:38:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-04 10:38:20 PST
Size:
10.76 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 239596) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2019-01-04 Alex Christensen <achristensen@webkit.org> >+ >+ Use WebsiteDataStoreParameters instead of NetworkProcessCreationParameters for IndexedDB directories >+ https://bugs.webkit.org/show_bug.cgi?id=193114 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-01-03 Brent Fulgham <bfulgham@apple.com> > > Remove logic handling DNT header during redirects >Index: Source/WebKit/NetworkProcess/NetworkProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.cpp (revision 239592) >+++ Source/WebKit/NetworkProcess/NetworkProcess.cpp (working copy) >@@ -302,7 +302,7 @@ void NetworkProcess::initializeNetworkPr > SessionTracker::setSession(sessionID, NetworkSession::create(WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters))); > > #if ENABLE(INDEXED_DATABASE) >- addIndexedDatabaseSession(PAL::SessionID::defaultSessionID(), parameters.indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle); >+ addIndexedDatabaseSession(sessionID, parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle); > #endif > > #if ENABLE(SERVICE_WORKER) >Index: Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (revision 239592) >+++ Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (working copy) >@@ -56,9 +56,6 @@ void NetworkProcessCreationParameters::e > encoder << cookieStorageDirectoryExtensionHandle; > encoder << containerCachesDirectoryExtensionHandle; > encoder << parentBundleDirectoryExtensionHandle; >-#if ENABLE(INDEXED_DATABASE) >- encoder << indexedDatabaseTempBlobDirectoryExtensionHandle; >-#endif > #endif > encoder << shouldSuppressMemoryPressureHandler; > encoder << shouldUseTestingNetworkSession; >@@ -97,10 +94,6 @@ void NetworkProcessCreationParameters::e > encoder << wirelessContextIdentifier; > #endif > >-#if ENABLE(INDEXED_DATABASE) >- encoder << indexedDatabaseDirectory << indexedDatabaseDirectoryExtensionHandle; >-#endif >- > #if ENABLE(SERVICE_WORKER) > encoder << serviceWorkerRegistrationDirectory << serviceWorkerRegistrationDirectoryExtensionHandle << urlSchemesServiceWorkersCanHandle << shouldDisableServiceWorkerProcessTerminationDelay; > #endif >@@ -150,14 +143,6 @@ bool NetworkProcessCreationParameters::d > if (!parentBundleDirectoryExtensionHandle) > return false; > result.parentBundleDirectoryExtensionHandle = WTFMove(*parentBundleDirectoryExtensionHandle); >- >-#if ENABLE(INDEXED_DATABASE) >- Optional<SandboxExtension::Handle> indexedDatabaseTempBlobDirectoryExtensionHandle; >- decoder >> indexedDatabaseTempBlobDirectoryExtensionHandle; >- if (!indexedDatabaseTempBlobDirectoryExtensionHandle) >- return false; >- result.indexedDatabaseTempBlobDirectoryExtensionHandle = WTFMove(*indexedDatabaseTempBlobDirectoryExtensionHandle); >-#endif > #endif > if (!decoder.decode(result.shouldSuppressMemoryPressureHandler)) > return false; >@@ -226,17 +211,6 @@ bool NetworkProcessCreationParameters::d > return false; > #endif > >-#if ENABLE(INDEXED_DATABASE) >- if (!decoder.decode(result.indexedDatabaseDirectory)) >- return false; >- >- Optional<SandboxExtension::Handle> indexedDatabaseDirectoryExtensionHandle; >- decoder >> indexedDatabaseDirectoryExtensionHandle; >- if (!indexedDatabaseDirectoryExtensionHandle) >- return false; >- result.indexedDatabaseDirectoryExtensionHandle = WTFMove(*indexedDatabaseDirectoryExtensionHandle); >-#endif >- > #if ENABLE(SERVICE_WORKER) > if (!decoder.decode(result.serviceWorkerRegistrationDirectory)) > return false; >Index: Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (revision 239592) >+++ Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (working copy) >@@ -67,9 +67,6 @@ struct NetworkProcessCreationParameters > SandboxExtension::Handle cookieStorageDirectoryExtensionHandle; > SandboxExtension::Handle containerCachesDirectoryExtensionHandle; > SandboxExtension::Handle parentBundleDirectoryExtensionHandle; >-#if ENABLE(INDEXED_DATABASE) >- SandboxExtension::Handle indexedDatabaseTempBlobDirectoryExtensionHandle; >-#endif > #endif > bool shouldSuppressMemoryPressureHandler { false }; > bool shouldUseTestingNetworkSession { false }; >@@ -112,11 +109,6 @@ struct NetworkProcessCreationParameters > unsigned wirelessContextIdentifier { 0 }; > #endif > >-#if ENABLE(INDEXED_DATABASE) >- String indexedDatabaseDirectory; >- SandboxExtension::Handle indexedDatabaseDirectoryExtensionHandle; >-#endif >- > #if ENABLE(SERVICE_WORKER) > String serviceWorkerRegistrationDirectory; > SandboxExtension::Handle serviceWorkerRegistrationDirectoryExtensionHandle; >Index: Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (revision 239585) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (working copy) >@@ -79,7 +79,7 @@ void NetworkProcess::platformInitializeN > SandboxExtension::consumePermanently(parameters.containerCachesDirectoryExtensionHandle); > SandboxExtension::consumePermanently(parameters.parentBundleDirectoryExtensionHandle); > #if ENABLE(INDEXED_DATABASE) >- SandboxExtension::consumePermanently(parameters.indexedDatabaseTempBlobDirectoryExtensionHandle); >+ SandboxExtension::consumePermanently(parameters.defaultDataStoreParameters.indexedDatabaseTempBlobDirectoryExtensionHandle); > #endif > #endif > m_diskCacheDirectory = parameters.diskCacheDirectory; >Index: Source/WebKit/Shared/WebsiteDataStoreParameters.cpp >=================================================================== >--- Source/WebKit/Shared/WebsiteDataStoreParameters.cpp (revision 239585) >+++ Source/WebKit/Shared/WebsiteDataStoreParameters.cpp (working copy) >@@ -44,6 +44,9 @@ void WebsiteDataStoreParameters::encode( > > #if ENABLE(INDEXED_DATABASE) > encoder << indexedDatabaseDirectory << indexedDatabaseDirectoryExtensionHandle; >+#if PLATFORM(IOS_FAMILY) >+ encoder << indexedDatabaseTempBlobDirectoryExtensionHandle; >+#endif > #endif > > #if ENABLE(SERVICE_WORKER) >@@ -91,6 +94,14 @@ Optional<WebsiteDataStoreParameters> Web > if (!indexedDatabaseDirectoryExtensionHandle) > return WTF::nullopt; > parameters.indexedDatabaseDirectoryExtensionHandle = WTFMove(*indexedDatabaseDirectoryExtensionHandle); >+ >+#if PLATFORM(IOS_FAMILY) >+ Optional<SandboxExtension::Handle> indexedDatabaseTempBlobDirectoryExtensionHandle; >+ decoder >> indexedDatabaseTempBlobDirectoryExtensionHandle; >+ if (!indexedDatabaseTempBlobDirectoryExtensionHandle) >+ return WTF::nullopt; >+ parameters.indexedDatabaseTempBlobDirectoryExtensionHandle = WTFMove(*indexedDatabaseTempBlobDirectoryExtensionHandle); >+#endif > #endif > > #if ENABLE(SERVICE_WORKER) >@@ -116,6 +127,9 @@ WebsiteDataStoreParameters WebsiteDataSt > return { { }, { }, { }, NetworkSessionCreationParameters::privateSessionParameters(sessionID) > #if ENABLE(INDEXED_DATABASE) > , { }, { } >+#if PLATFORM(IOS_FAMILY) >+ , { } >+#endif > #endif > #if ENABLE(SERVICE_WORKER) > , { }, { } >Index: Source/WebKit/Shared/WebsiteDataStoreParameters.h >=================================================================== >--- Source/WebKit/Shared/WebsiteDataStoreParameters.h (revision 239585) >+++ Source/WebKit/Shared/WebsiteDataStoreParameters.h (working copy) >@@ -59,6 +59,9 @@ struct WebsiteDataStoreParameters { > #if ENABLE(INDEXED_DATABASE) > String indexedDatabaseDirectory; > SandboxExtension::Handle indexedDatabaseDirectoryExtensionHandle; >+#if PLATFORM(IOS_FAMILY) >+ SandboxExtension::Handle indexedDatabaseTempBlobDirectoryExtensionHandle; >+#endif > #endif > > #if ENABLE(SERVICE_WORKER) >Index: Source/WebKit/UIProcess/WebProcessPool.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.cpp (revision 239592) >+++ Source/WebKit/UIProcess/WebProcessPool.cpp (working copy) >@@ -510,7 +510,7 @@ NetworkProcessProxy& WebProcessPool::ens > SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::Type::ReadOnly, parameters.parentBundleDirectoryExtensionHandle); > > #if ENABLE(INDEXED_DATABASE) >- SandboxExtension::createHandleForTemporaryFile(emptyString(), SandboxExtension::Type::ReadWrite, parameters.indexedDatabaseTempBlobDirectoryExtensionHandle); >+ SandboxExtension::createHandleForTemporaryFile(emptyString(), SandboxExtension::Type::ReadWrite, parameters.defaultDataStoreParameters.indexedDatabaseTempBlobDirectoryExtensionHandle); > #endif > #endif > >@@ -528,11 +528,11 @@ NetworkProcessProxy& WebProcessPool::ens > // ********* > // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>) > // ********* >- parameters.indexedDatabaseDirectory = m_configuration->indexedDBDatabaseDirectory(); >- if (parameters.indexedDatabaseDirectory.isEmpty()) >- parameters.indexedDatabaseDirectory = API::WebsiteDataStore::defaultDataStore()->websiteDataStore().parameters().indexedDatabaseDirectory; >+ parameters.defaultDataStoreParameters.indexedDatabaseDirectory = m_configuration->indexedDBDatabaseDirectory(); >+ if (parameters.defaultDataStoreParameters.indexedDatabaseDirectory.isEmpty()) >+ parameters.defaultDataStoreParameters.indexedDatabaseDirectory = API::WebsiteDataStore::defaultDataStore()->websiteDataStore().parameters().indexedDatabaseDirectory; > >- SandboxExtension::createHandleForReadWriteDirectory(parameters.indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle); >+ SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle); > #endif > > #if ENABLE(SERVICE_WORKER)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
beidson
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193114
:
358261
| 358333