Make the network cache directory part of WKContextConfigurationRef
Created attachment 254379 [details] Patch
Committed r185262: <http://trac.webkit.org/changeset/185262>
Comment on attachment 254379 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254379&action=review > Source/WebKit2/UIProcess/WebProcessPool.cpp:170 > + , m_diskCacheDirectory(configuration.diskCacheDirectory()) Why do we need to keep this member? WebProcessPool saves the configuration, why not using m_configuration->diskCacheDirectory() directly when needed? This would also allow us to override the disk cache before the network process is spawned. We need it because we have an API method to set the disk cache, that is now broken. I can deprecate it in favor of a construct-only property of our WebContext, but while the method is deprecated it should at least work.
Comment on attachment 254379 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254379&action=review >> Source/WebKit2/UIProcess/WebProcessPool.cpp:170 >> + , m_diskCacheDirectory(configuration.diskCacheDirectory()) > > Why do we need to keep this member? WebProcessPool saves the configuration, why not using m_configuration->diskCacheDirectory() directly when needed? This would also allow us to override the disk cache before the network process is spawned. We need it because we have an API method to set the disk cache, that is now broken. I can deprecate it in favor of a construct-only property of our WebContext, but while the method is deprecated it should at least work. That won't work anyway because we copy the passed in configuration.
(In reply to comment #4) > Comment on attachment 254379 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254379&action=review > > >> Source/WebKit2/UIProcess/WebProcessPool.cpp:170 > >> + , m_diskCacheDirectory(configuration.diskCacheDirectory()) > > > > Why do we need to keep this member? WebProcessPool saves the configuration, why not using m_configuration->diskCacheDirectory() directly when needed? This would also allow us to override the disk cache before the network process is spawned. We need it because we have an API method to set the disk cache, that is now broken. I can deprecate it in favor of a construct-only property of our WebContext, but while the method is deprecated it should at least work. > > That won't work anyway because we copy the passed in configuration. Yes, and we have a method that returns a reference to the copied config, so we can change that, see patch in bug #145735.