Bug 237085 - Share more code between service and shared workers for context connection establishment
Summary: Share more code between service and shared workers for context connection est...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-23 07:46 PST by Chris Dumez
Modified: 2022-02-23 12:14 PST (History)
6 users (show)

See Also:


Attachments
Patch (44.35 KB, patch)
2022-02-23 08:02 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (51.29 KB, patch)
2022-02-23 08:56 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (52.68 KB, patch)
2022-02-23 08:59 PST, Chris Dumez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (52.55 KB, patch)
2022-02-23 09:50 PST, 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 2022-02-23 07:46:26 PST
Share more code between service and shared workers for context connection establishment.
Comment 1 Chris Dumez 2022-02-23 08:02:32 PST
Created attachment 452981 [details]
Patch
Comment 2 youenn fablet 2022-02-23 08:24:22 PST
Comment on attachment 452981 [details]
Patch

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

> Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in:59
> +    EstablishRemoteWorkerContextConnectionToNetworkProcess(enum:uint32_t WebKit::RemoteWorkerType workerType, WebCore::RegistrableDomain registrableDomain, std::optional<WebCore::ProcessIdentifier> requestingProcessIdentifier, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, PAL::SessionID sessionID) -> () Async

Why is it a uint32_t, should it not be either a bool or maybe a uint8_t?

> Source/WebKit/UIProcess/WebProcessPool.cpp:558
> +    bool shouldUseSeparateRemoteWorkerProcess = workerType == RemoteWorkerType::ServiceWorker && s_useSeparateServiceWorkerProcess;

We might want to use s_useSeparateServiceWorkerProcess for shared workers as well for testing things like crash of shared worker process.
Comment 3 Chris Dumez 2022-02-23 08:56:04 PST
Created attachment 452985 [details]
Patch
Comment 4 Chris Dumez 2022-02-23 08:59:12 PST
Created attachment 452986 [details]
Patch
Comment 5 Chris Dumez 2022-02-23 09:50:25 PST
Created attachment 452994 [details]
Patch
Comment 6 EWS 2022-02-23 12:13:36 PST
Committed r290387 (247702@main): <https://commits.webkit.org/247702@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452994 [details].
Comment 7 Radar WebKit Bug Importer 2022-02-23 12:14:16 PST
<rdar://problem/89370920>