Bug 184463

Summary: Avoid constructing a service worker RegistrationStore for private sessions
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Service WorkersAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, dbates, ews-watchlist, mkwst, nishan.unilex, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2018-04-10 13:00:05 PDT
Avoid constructing a service worker RegistrationStore from private sessions since there is no need for persistence and the registrationDatabaseDirectory is the empty string in such cases.
Comment 1 Chris Dumez 2018-04-10 13:00:24 PDT
<rdar://problem/36613948>
Comment 2 Chris Dumez 2018-04-10 13:04:20 PDT
Created attachment 337627 [details]
Patch
Comment 3 youenn fablet 2018-04-10 13:51:42 PDT
Comment on attachment 337627 [details]
Patch

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

> Source/WebCore/workers/service/server/SWServer.h:231
> +    std::unique_ptr<RegistrationStore> m_registrationStore;

Might be able to forward-declare RegistrationStore now?
Comment 4 Chris Dumez 2018-04-10 15:28:11 PDT
Created attachment 337645 [details]
Patch
Comment 5 WebKit Commit Bot 2018-04-10 16:19:59 PDT
Comment on attachment 337645 [details]
Patch

Clearing flags on attachment: 337645

Committed r230500: <https://trac.webkit.org/changeset/230500>
Comment 6 WebKit Commit Bot 2018-04-10 16:20:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Daniel Bates 2018-04-10 21:47:44 PDT
Comment on attachment 337645 [details]
Patch

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

> Source/WebCore/workers/service/server/SWServerWorker.h:30
> +#include "ContentSecurityPolicyResponseHeaders.h"

Is it necessary to includ this header?

> Source/WebKit/StorageProcess/StorageProcess.cpp:197
> +        if (!parameters.indexedDatabaseDirectory.isEmpty())

How is this change related to the related to this bug?

> Source/WebKit/StorageProcess/StorageProcess.cpp:210
> +        if (!parameters.serviceWorkerRegistrationDirectory.isEmpty())

Ditto.
Comment 8 Daniel Bates 2018-04-10 21:49:11 PDT
(In reply to Daniel Bates from comment #7)
> Comment on attachment 337645 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=337645&action=review
> 
> > Source/WebCore/workers/service/server/SWServerWorker.h:30
> > +#include "ContentSecurityPolicyResponseHeaders.h"
> 
> Is it necessary to includ this header?

Is it necessary to include this header?

> 
> > Source/WebKit/StorageProcess/StorageProcess.cpp:197
> > +        if (!parameters.indexedDatabaseDirectory.isEmpty())
> 
> How is this change related to the related to this bug?

Never mind.

> 
> > Source/WebKit/StorageProcess/StorageProcess.cpp:210
> > +        if (!parameters.serviceWorkerRegistrationDirectory.isEmpty())
> 
> Ditto.

Never mind.
Comment 9 Chris Dumez 2018-04-11 09:20:31 PDT
Comment on attachment 337645 [details]
Patch

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

>>> Source/WebCore/workers/service/server/SWServerWorker.h:30
>>> +#include "ContentSecurityPolicyResponseHeaders.h"
>> 
>> Is it necessary to includ this header?
> 
> Is it necessary to include this header?

Yes due to the following data member in this class:
ContentSecurityPolicyResponseHeaders m_contentSecurityPolicy;
Comment 10 sam duke 2018-10-29 04:20:01 PDT
[url=https://www.unilexconsultants.com/start-a-business/private-limited-company-registration/] Online Private company registration [/url]