Bug 145711 - Make the network cache directory part of WKContextConfigurationRef
Summary: Make the network cache directory part of WKContextConfigurationRef
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks: 145724
  Show dependency treegraph
 
Reported: 2015-06-05 13:48 PDT by Anders Carlsson
Modified: 2015-06-07 22:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (17.92 KB, patch)
2015-06-05 13:51 PDT, Anders Carlsson
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.