Changeset 239632 in webkit
- Timestamp:
- Jan 4, 2019, 1:13:25 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r239631 r239632 1 2019-01-04 Alex Christensen <achristensen@webkit.org> 2 3 Use WebsiteDataStoreParameters instead of NetworkProcessCreationParameters for IndexedDB directories 4 https://bugs.webkit.org/show_bug.cgi?id=193114 5 6 Reviewed by Brady Eidson. 7 8 * NetworkProcess/NetworkProcess.cpp: 9 (WebKit::NetworkProcess::initializeNetworkProcess): 10 * NetworkProcess/NetworkProcessCreationParameters.cpp: 11 (WebKit::NetworkProcessCreationParameters::encode const): 12 (WebKit::NetworkProcessCreationParameters::decode): 13 * NetworkProcess/NetworkProcessCreationParameters.h: 14 * UIProcess/WebProcessPool.cpp: 15 (WebKit::WebProcessPool::ensureNetworkProcess): 16 1 17 2019-01-04 Alex Christensen <achristensen@webkit.org> 2 18 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r239592 r239632 303 303 304 304 #if ENABLE(INDEXED_DATABASE) 305 addIndexedDatabaseSession( PAL::SessionID::defaultSessionID(), parameters.indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle);305 addIndexedDatabaseSession(sessionID, parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle); 306 306 #endif 307 307 -
trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp
r239624 r239632 57 57 encoder << containerCachesDirectoryExtensionHandle; 58 58 encoder << parentBundleDirectoryExtensionHandle; 59 #if ENABLE(INDEXED_DATABASE)60 encoder << indexedDatabaseTempBlobDirectoryExtensionHandle;61 #endif62 59 #endif 63 60 encoder << shouldSuppressMemoryPressureHandler; … … 96 93 #endif 97 94 98 #if ENABLE(INDEXED_DATABASE)99 encoder << indexedDatabaseDirectory << indexedDatabaseDirectoryExtensionHandle;100 #endif101 102 95 #if ENABLE(SERVICE_WORKER) 103 96 encoder << serviceWorkerRegistrationDirectory << serviceWorkerRegistrationDirectoryExtensionHandle << urlSchemesServiceWorkersCanHandle << shouldDisableServiceWorkerProcessTerminationDelay; … … 149 142 return false; 150 143 result.parentBundleDirectoryExtensionHandle = WTFMove(*parentBundleDirectoryExtensionHandle); 151 152 #if ENABLE(INDEXED_DATABASE)153 Optional<SandboxExtension::Handle> indexedDatabaseTempBlobDirectoryExtensionHandle;154 decoder >> indexedDatabaseTempBlobDirectoryExtensionHandle;155 if (!indexedDatabaseTempBlobDirectoryExtensionHandle)156 return false;157 result.indexedDatabaseTempBlobDirectoryExtensionHandle = WTFMove(*indexedDatabaseTempBlobDirectoryExtensionHandle);158 #endif159 144 #endif 160 145 if (!decoder.decode(result.shouldSuppressMemoryPressureHandler)) … … 222 207 #endif 223 208 224 #if ENABLE(INDEXED_DATABASE)225 if (!decoder.decode(result.indexedDatabaseDirectory))226 return false;227 228 Optional<SandboxExtension::Handle> indexedDatabaseDirectoryExtensionHandle;229 decoder >> indexedDatabaseDirectoryExtensionHandle;230 if (!indexedDatabaseDirectoryExtensionHandle)231 return false;232 result.indexedDatabaseDirectoryExtensionHandle = WTFMove(*indexedDatabaseDirectoryExtensionHandle);233 #endif234 235 209 #if ENABLE(SERVICE_WORKER) 236 210 if (!decoder.decode(result.serviceWorkerRegistrationDirectory)) -
trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
r239624 r239632 68 68 SandboxExtension::Handle containerCachesDirectoryExtensionHandle; 69 69 SandboxExtension::Handle parentBundleDirectoryExtensionHandle; 70 #if ENABLE(INDEXED_DATABASE)71 SandboxExtension::Handle indexedDatabaseTempBlobDirectoryExtensionHandle;72 #endif73 70 #endif 74 71 bool shouldSuppressMemoryPressureHandler { false }; … … 111 108 #endif 112 109 113 #if ENABLE(INDEXED_DATABASE)114 String indexedDatabaseDirectory;115 SandboxExtension::Handle indexedDatabaseDirectoryExtensionHandle;116 #endif117 118 110 #if ENABLE(SERVICE_WORKER) 119 111 String serviceWorkerRegistrationDirectory; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r239572 r239632 80 80 SandboxExtension::consumePermanently(parameters.parentBundleDirectoryExtensionHandle); 81 81 #if ENABLE(INDEXED_DATABASE) 82 SandboxExtension::consumePermanently(parameters. indexedDatabaseTempBlobDirectoryExtensionHandle);82 SandboxExtension::consumePermanently(parameters.defaultDataStoreParameters.indexedDatabaseTempBlobDirectoryExtensionHandle); 83 83 #endif 84 84 #endif -
trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.cpp
r239427 r239632 45 45 #if ENABLE(INDEXED_DATABASE) 46 46 encoder << indexedDatabaseDirectory << indexedDatabaseDirectoryExtensionHandle; 47 #if PLATFORM(IOS_FAMILY) 48 encoder << indexedDatabaseTempBlobDirectoryExtensionHandle; 49 #endif 47 50 #endif 48 51 … … 92 95 return WTF::nullopt; 93 96 parameters.indexedDatabaseDirectoryExtensionHandle = WTFMove(*indexedDatabaseDirectoryExtensionHandle); 97 98 #if PLATFORM(IOS_FAMILY) 99 Optional<SandboxExtension::Handle> indexedDatabaseTempBlobDirectoryExtensionHandle; 100 decoder >> indexedDatabaseTempBlobDirectoryExtensionHandle; 101 if (!indexedDatabaseTempBlobDirectoryExtensionHandle) 102 return WTF::nullopt; 103 parameters.indexedDatabaseTempBlobDirectoryExtensionHandle = WTFMove(*indexedDatabaseTempBlobDirectoryExtensionHandle); 104 #endif 94 105 #endif 95 106 … … 117 128 #if ENABLE(INDEXED_DATABASE) 118 129 , { }, { } 130 #if PLATFORM(IOS_FAMILY) 131 , { } 132 #endif 119 133 #endif 120 134 #if ENABLE(SERVICE_WORKER) -
trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.h
r239427 r239632 60 60 String indexedDatabaseDirectory; 61 61 SandboxExtension::Handle indexedDatabaseDirectoryExtensionHandle; 62 #if PLATFORM(IOS_FAMILY) 63 SandboxExtension::Handle indexedDatabaseTempBlobDirectoryExtensionHandle; 64 #endif 62 65 #endif 63 66 -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r239623 r239632 511 511 512 512 #if ENABLE(INDEXED_DATABASE) 513 SandboxExtension::createHandleForTemporaryFile(emptyString(), SandboxExtension::Type::ReadWrite, parameters. indexedDatabaseTempBlobDirectoryExtensionHandle);513 SandboxExtension::createHandleForTemporaryFile(emptyString(), SandboxExtension::Type::ReadWrite, parameters.defaultDataStoreParameters.indexedDatabaseTempBlobDirectoryExtensionHandle); 514 514 #endif 515 515 #endif … … 529 529 // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>) 530 530 // ********* 531 parameters. indexedDatabaseDirectory = m_configuration->indexedDBDatabaseDirectory();532 if (parameters. indexedDatabaseDirectory.isEmpty())533 parameters. indexedDatabaseDirectory = API::WebsiteDataStore::defaultDataStore()->websiteDataStore().parameters().indexedDatabaseDirectory;531 parameters.defaultDataStoreParameters.indexedDatabaseDirectory = m_configuration->indexedDBDatabaseDirectory(); 532 if (parameters.defaultDataStoreParameters.indexedDatabaseDirectory.isEmpty()) 533 parameters.defaultDataStoreParameters.indexedDatabaseDirectory = API::WebsiteDataStore::defaultDataStore()->websiteDataStore().parameters().indexedDatabaseDirectory; 534 534 535 SandboxExtension::createHandleForReadWriteDirectory(parameters. indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle);535 SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle); 536 536 #endif 537 537
Note:
See TracChangeset
for help on using the changeset viewer.