Changeset 252880 in webkit
- Timestamp:
- Nov 26, 2019 2:28:09 AM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r252875 r252880 1 2019-11-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(2.27.2): [GTK] Incognito mode is broken under flatpak 4 https://bugs.webkit.org/show_bug.cgi?id=203460 5 6 Reviewed by Youenn Fablet. 7 8 The problem is that in ephemeral sessions the base disk cache directory is null, and Storage::open() ends up 9 building a cache path with only the version part (/Version n). For some reason g_mkdir_with_parents() doesn't 10 return -1 in flatpak when it fails to create the directory due to write permission, like in this case. But the 11 network process ends up crashing later trying to open a directory that doesn't exist. 12 13 * NetworkProcess/NetworkSession.cpp: 14 (WebKit::NetworkSession::NetworkSession): Do not create the cache if networkCacheDirectory is null. 15 * NetworkProcess/cache/NetworkCacheStorage.cpp: 16 (WebKit::NetworkCache::Storage::open): Add an ASSERT to ensure we don't receive a null baseCachePath. 17 1 18 2019-11-25 Yusuke Suzuki <ysuzuki@apple.com> 2 19 -
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
r252840 r252880 88 88 if (!m_sessionID.isEphemeral()) { 89 89 String networkCacheDirectory = parameters.networkCacheDirectory; 90 if (!networkCacheDirectory.isNull()) 90 if (!networkCacheDirectory.isNull()) { 91 91 SandboxExtension::consumePermanently(parameters.networkCacheDirectoryExtensionHandle); 92 92 93 auto cacheOptions = networkProcess.cacheOptions();93 auto cacheOptions = networkProcess.cacheOptions(); 94 94 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) 95 if (parameters.networkCacheSpeculativeValidationEnabled) 96 cacheOptions.add(NetworkCache::CacheOption::SpeculativeRevalidation); 97 #endif 98 if (parameters.shouldUseTestingNetworkSession) 99 cacheOptions.add(NetworkCache::CacheOption::TestingMode); 100 101 m_cache = NetworkCache::Cache::open(networkProcess, networkCacheDirectory, cacheOptions, m_sessionID); 102 103 if (!m_cache) 104 RELEASE_LOG_ERROR(NetworkCache, "Failed to initialize the WebKit network disk cache"); 105 95 if (parameters.networkCacheSpeculativeValidationEnabled) 96 cacheOptions.add(NetworkCache::CacheOption::SpeculativeRevalidation); 97 #endif 98 if (parameters.shouldUseTestingNetworkSession) 99 cacheOptions.add(NetworkCache::CacheOption::TestingMode); 100 101 m_cache = NetworkCache::Cache::open(networkProcess, networkCacheDirectory, cacheOptions, m_sessionID); 102 103 if (!m_cache) 104 RELEASE_LOG_ERROR(NetworkCache, "Failed to initialize the WebKit network disk cache"); 105 } 106 106 107 if (!parameters.resourceLoadStatisticsDirectory.isEmpty()) 107 108 SandboxExtension::consumePermanently(parameters.resourceLoadStatisticsDirectoryExtensionHandle); -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp
r252264 r252880 178 178 { 179 179 ASSERT(RunLoop::isMain()); 180 ASSERT(!baseCachePath.isNull()); 180 181 181 182 auto cachePath = makeCachePath(baseCachePath);
Note: See TracChangeset
for help on using the changeset viewer.