The heuristic used in WebKit currently for detecting cache partitions fails in a sizable number of cases. We should call back into the system to ask it for the names of the partitions instead.
Created attachment 197898 [details] Patch
Comment on attachment 197898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197898&action=review r=me (Wow, that's a lot of indirection to get the list of origins.) > Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp:59 > +#if USE(CFURLCACHE) > + __block > +#endif > MemoryCache::SecurityOriginSet origins; I think it would be clearer to write it this way: #if USE(CFURLCACHE) __block MemoryCache::SecurityOriginSet origins; #else MemoryCache::SecurityOriginSet origins; #endif Also, should the #if check be this since it's the only time that 'origins' is used in a block? #if USE(CFURLCACHE) && ENABLE(CACHE_PARTITIONING) __block MemoryCache::SecurityOriginSet origins; #else MemoryCache::SecurityOriginSet origins; #endif
(In reply to comment #2) > (From update of attachment 197898 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=197898&action=review > > r=me (Wow, that's a lot of indirection to get the list of origins.) > > > Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp:59 > > +#if USE(CFURLCACHE) > > + __block > > +#endif > > MemoryCache::SecurityOriginSet origins; > > I think it would be clearer to write it this way: > > #if USE(CFURLCACHE) > __block MemoryCache::SecurityOriginSet origins; > #else > MemoryCache::SecurityOriginSet origins; > #endif I suppose it probably would be better style this way, yes. > Also, should the #if check be this since it's the only time that 'origins' is used in a block? > > #if USE(CFURLCACHE) && ENABLE(CACHE_PARTITIONING) > __block MemoryCache::SecurityOriginSet origins; > #else > MemoryCache::SecurityOriginSet origins; > #endif Hm, yeah, I must have missed that, but you're right.
Committed r148329: <http://trac.webkit.org/changeset/148329>
<rdar://problem/13395445>
This should have been signed off by a WebKit2 owner. Please try to remember that in the future.