WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201506
Remove ServiceWorkerProcessProxy
https://bugs.webkit.org/show_bug.cgi?id=201506
Summary
Remove ServiceWorkerProcessProxy
youenn fablet
Reported
2019-09-05 05:25:34 PDT
Remove ServiceWorkerProcessProxy and use WebProcessProxy directly. This will allow us to run service workers inside already launched regular web processes.
Attachments
Patch
(40.75 KB, patch)
2019-09-05 06:34 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(43.06 KB, patch)
2019-09-05 07:16 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(43.27 KB, patch)
2019-09-06 04:50 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(36.58 KB, patch)
2019-09-09 00:47 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-09-05 06:34:57 PDT
Created
attachment 378077
[details]
Patch
youenn fablet
Comment 2
2019-09-05 07:16:32 PDT
Created
attachment 378081
[details]
Patch
youenn fablet
Comment 3
2019-09-06 04:50:49 PDT
Created
attachment 378182
[details]
Patch
Chris Dumez
Comment 4
2019-09-06 08:47:17 PDT
Comment on
attachment 378182
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378182&action=review
> Source/WebCore/workers/service/ServiceWorkerProvider.cpp:70 > + if (dummyDocumentIdentifiers.contains(document->identifier()))
Why cannot we simply use if (!document->page() || document->page()->isUtilityPage()) continue; ?
> Source/WebCore/workers/service/context/SWContextManager.cpp:180 > +HashSet<DocumentIdentifier> SWContextManager::dummyDocumentIdentifiers() const
Not convinced this is needed.
> Source/WebCore/workers/service/context/SWContextManager.cpp:193 > + m_pendingServiceWorkerTerminationRequests.add(serviceWorker->identifier(), makeUnique<ServiceWorkerTerminationRequest>(*this, serviceWorker->identifier(), 10_s));
We likely want a global constant for this 10_s.
> Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h:79 > + DocumentIdentifier dummyDocumentIdentifier() const { return m_document->identifier(); }
Not convinced this is needed.
> Source/WebKit/UIProcess/WebProcessProxy.cpp:137 > +Ref<WebProcessProxy> WebProcessProxy::createForServiceWorkers(WebProcessPool& processPool, RegistrableDomain&& registrableDomain, WebsiteDataStore& websiteDataStore)
Why do we want a new createForServiceWorkers() factory function? Why cannot we use the regular create() and then have a setter for the service worker information (e.g. WebProcessProxy::initializeServiceWorkerInformation())? I imagine that in the future, the WebProcessProxy may already be running (for a page) and we'll need to add the service worker information to it after the fact, so such setter would be useful anyway.
> Source/WebKit/UIProcess/WebProcessProxy.cpp:292 > + launchOptions.extraInitializationData.add("service-worker-process"_s, "1"_s);
Looks like this is going to need to change at some point if we want process sharing between service workers and pages.
youenn fablet
Comment 5
2019-09-09 00:25:17 PDT
I'll reduce the patch to removing ServiceWorkerProcessProxy only, we can then progressively land the changes to make service workers coexist with real pages.
youenn fablet
Comment 6
2019-09-09 00:47:26 PDT
Created
attachment 378355
[details]
Patch
youenn fablet
Comment 7
2019-09-09 00:49:00 PDT
> Why do we want a new createForServiceWorkers() factory function? Why cannot > we use the regular create() and then have a setter for the service worker > information (e.g. WebProcessProxy::initializeServiceWorkerInformation())? > I imagine that in the future, the WebProcessProxy may already be running > (for a page) and we'll need to add the service worker information to it > after the fact, so such setter would be useful anyway.
I kept it this way for now, m_registrableDomain is fully controlled by WebProcessProxy for now.
Chris Dumez
Comment 8
2019-09-09 08:52:54 PDT
Comment on
attachment 378355
[details]
Patch r=me
WebKit Commit Bot
Comment 9
2019-09-09 10:02:21 PDT
Comment on
attachment 378355
[details]
Patch Clearing flags on attachment: 378355 Committed
r249647
: <
https://trac.webkit.org/changeset/249647
>
WebKit Commit Bot
Comment 10
2019-09-09 10:02:22 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2019-09-09 10:03:22 PDT
<
rdar://problem/55186170
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug