Bug 182403

Summary: Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Follow-up fix none

Description youenn fablet 2018-02-01 12:55:34 PST
Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
Comment 1 youenn fablet 2018-02-01 12:58:27 PST
<rdar://problem/36673358>
Comment 2 youenn fablet 2018-02-01 13:11:46 PST
Created attachment 332902 [details]
Patch
Comment 3 youenn fablet 2018-02-01 18:13:20 PST
Created attachment 332929 [details]
Patch
Comment 4 Chris Dumez 2018-02-01 21:04:13 PST
It'd be good if Alex or Brady took a look at this one.
Comment 5 WebKit Commit Bot 2018-02-02 11:25:25 PST
Comment on attachment 332929 [details]
Patch

Clearing flags on attachment: 332929

Committed r228019: <https://trac.webkit.org/changeset/228019>
Comment 6 WebKit Commit Bot 2018-02-02 11:25:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 youenn fablet 2018-02-02 15:57:38 PST
Reopening to attach new patch.
Comment 8 youenn fablet 2018-02-02 15:57:38 PST
Created attachment 333014 [details]
Follow-up fix
Comment 9 WebKit Commit Bot 2018-02-02 16:36:26 PST
Comment on attachment 333014 [details]
Follow-up fix

Clearing flags on attachment: 333014

Committed r228033: <https://trac.webkit.org/changeset/228033>
Comment 10 WebKit Commit Bot 2018-02-02 16:36:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Chris Dumez 2018-02-05 14:38:04 PST
After this change, it seems all WebKitTestRunner instances share the same registration database direction, thus introducing flakiness :/
Comment 12 Chris Dumez 2018-02-05 14:48:30 PST
Comment on attachment 332929 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=332929&action=review

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:111
> +    void setServiceWorkerRegistrationDirectory(String&& directory) { m_resolvedConfiguration.serviceWorkerRegistrationDirectory = WTFMove(directory); }

WebsiteDataStore::resolveDirectoriesIfNecessary() overrides the path you set here in the resolvedConfiguration with the default path that is in the configuration :/
Comment 13 youenn fablet 2018-02-05 15:08:45 PST
(In reply to Chris Dumez from comment #12)
> Comment on attachment 332929 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=332929&action=review
> 
> > Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:111
> > +    void setServiceWorkerRegistrationDirectory(String&& directory) { m_resolvedConfiguration.serviceWorkerRegistrationDirectory = WTFMove(directory); }
> 
> WebsiteDataStore::resolveDirectoriesIfNecessary() overrides the path you set
> here in the resolvedConfiguration with the default path that is in the
> configuration :/

Filed https://bugs.webkit.org/show_bug.cgi?id=182514