RESOLVED FIXED 184463
Avoid constructing a service worker RegistrationStore for private sessions
https://bugs.webkit.org/show_bug.cgi?id=184463
Summary Avoid constructing a service worker RegistrationStore for private sessions
Chris Dumez
Reported 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.
Attachments
Patch (7.26 KB, patch)
2018-04-10 13:04 PDT, Chris Dumez
no flags
Patch (8.26 KB, patch)
2018-04-10 15:28 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-04-10 13:00:24 PDT
Chris Dumez
Comment 2 2018-04-10 13:04:20 PDT
youenn fablet
Comment 3 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?
Chris Dumez
Comment 4 2018-04-10 15:28:11 PDT
WebKit Commit Bot
Comment 5 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>
WebKit Commit Bot
Comment 6 2018-04-10 16:20:00 PDT
All reviewed patches have been landed. Closing bug.
Daniel Bates
Comment 7 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.
Daniel Bates
Comment 8 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.
Chris Dumez
Comment 9 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;
Note You need to log in before you can comment on or make changes to this bug.