Bug 145711

Summary: Make the network cache directory part of WKContextConfigurationRef
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 145724    
Attachments:
Description Flags
Patch koivisto: review+

Description Anders Carlsson 2015-06-05 13:48:10 PDT
Make the network cache directory part of WKContextConfigurationRef
Comment 1 Anders Carlsson 2015-06-05 13:51:19 PDT
Created attachment 254379 [details]
Patch
Comment 2 Anders Carlsson 2015-06-05 14:31:53 PDT
Committed r185262: <http://trac.webkit.org/changeset/185262>
Comment 3 Carlos Garcia Campos 2015-06-07 03:00:49 PDT
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 4 Anders Carlsson 2015-06-07 15:39:39 PDT
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.
Comment 5 Carlos Garcia Campos 2015-06-07 22:41:23 PDT
(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.