Bug 184463 - Avoid constructing a service worker RegistrationStore for private sessions
Summary: Avoid constructing a service worker RegistrationStore for private sessions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-10 13:00 PDT by Chris Dumez
Modified: 2018-10-29 04:20 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.26 KB, patch)
2018-04-10 13:04 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.26 KB, patch)
2018-04-10 15:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

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