Bug 193847 - Move parentProcessConnection from ChildProcess to {NetworkProcess, WebProcess, PluginProcess}
Summary: Move parentProcessConnection from ChildProcess to {NetworkProcess, WebProcess...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-25 14:40 PST by Alex Christensen
Modified: 2019-03-14 14:37 PDT (History)
4 users (show)

See Also:


Attachments
Patch (17.61 KB, patch)
2019-01-25 14:42 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (17.66 KB, patch)
2019-01-25 15:53 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-01-25 14:40:47 PST
Move parentProcessConnection from ChildProcess to {NetworkProcess, WebProcess, PluginProcess}
Comment 1 Alex Christensen 2019-01-25 14:42:07 PST
Created attachment 360168 [details]
Patch
Comment 2 Alex Christensen 2019-01-25 15:47:28 PST
Comment on attachment 360168 [details]
Patch

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

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:161
>      initialize(WTFMove(parameters));
> +
> +    m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this);

This uses parameters after it has been moved from.  Will fix.
Comment 3 Alex Christensen 2019-01-25 15:53:19 PST
Created attachment 360179 [details]
Patch
Comment 4 Sam Weinig 2019-01-26 12:28:16 PST
Comment on attachment 360179 [details]
Patch

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

> Source/WebKit/ChangeLog:8
> +        This is paving the way for the NetworkProcess to be split into a NetworkProcess and set of NetworkConnectionToUIProcess containing the connections.

Can you tell me more about the future here?  Is the idea that NetworkProcess in the future will be system wide and will be able to communicate with multiple UIProcesses? If so, it seems like a better direction would be to make it so that NetworkProcess no longer derives from ChildProcess, since it's not a "child process" anymore.
Comment 5 Alex Christensen 2019-01-26 19:35:57 PST
Sam, this is a step towards exactly that, except we plan to have a system-wide NetworkProcess for only certain SPI users.
Comment 6 Sam Weinig 2019-01-27 15:04:10 PST
(In reply to Alex Christensen from comment #5)
> Sam, this is a step towards exactly that, except we plan to have a
> system-wide NetworkProcess for only certain SPI users.

Ok, I then I think it makes sense to not make this change to ChildProcess, and just make this new "SystemWideNetworkService" not derive from ChildProcess, since it isn't a "child process" anymore.
Comment 7 Geoffrey Garen 2019-01-28 14:30:45 PST
Comment on attachment 360179 [details]
Patch

What are some of the behaviors of ChildProcess that NetworkProcess will still want after it has multiple UI process clients? And what behaviors would remain unique to ChildProcess, and unsupported by NetworkProcess?

Could the shared behaviors meaningfully move into a shared base class named "AuxiliaryProcess"?

Answering these questions might help us understand the class relationships.