[webkit-reviews] review granted: [Bug 210142] Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection : [Attachment 395726] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 7 12:58:15 PDT 2020
youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 210142: Simplify and fortify network getNetworkProcessConnection and
getGPUProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=210142
Attachment 395726: Patch
https://bugs.webkit.org/attachment.cgi?id=395726&action=review
--- Comment #2 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 395726
--> https://bugs.webkit.org/attachment.cgi?id=395726
Patch
Test?
View in context: https://bugs.webkit.org/attachment.cgi?id=395726&action=review
> Source/WebKit/ChangeLog:20
> + I do the same changes to NetworkProcess and GPUProcess because they
are intended to be the same. The latter is based on the former.
If there is a lot of common code between the two, maybe we should refactor the
code to share more between the two.
> Source/WebKit/UIProcess/WebProcessPool.cpp:745
> + m_networkProcess->getNetworkProcessConnection(webProcessProxy, [this,
protectedThis = makeRef(*this), webProcessProxy = makeWeakPtr(webProcessProxy),
reply = WTFMove(reply)] (auto& connectionInfo) mutable {
weakThis instead of protectedThis might be better.
> Source/WebKit/UIProcess/WebProcessPool.cpp:749
> + m_networkProcess->getNetworkProcessConnection(*webProcessProxy,
WTFMove(reply));
return to not have any else
> Source/WebKit/UIProcess/WebProcessPool.cpp:767
> + GPUProcessProxy::singleton().getGPUProcessConnection(webProcessProxy,
[this, protectedThis = makeRef(*this), webProcessProxy =
makeWeakPtr(webProcessProxy), reply = WTFMove(reply)] (auto& connectionInfo)
mutable {
Ditto.
> Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:186
> + sendWithAsyncReply(Messages::GPUProcess::CreateGPUConnectionToWebProcess
{ webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() },
[this, weakThis = makeWeakPtr(*this), reply = WTFMove(reply), activity =
throttler().foregroundActivity("GPUProcessProxy::getGPUProcessConnection"_s)](a
uto&& connectionIdentifier) mutable {
A background activity might be better here than a foreground activity, and in
sync with release logging.
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:141
> +
sendWithAsyncReply(Messages::NetworkProcess::CreateNetworkConnectionToWebProces
s { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() },
[this, weakThis = makeWeakPtr(*this), reply = WTFMove(reply), activity =
throttler().backgroundActivity("NetworkProcessProxy::getNetworkProcessConnectio
n"_s)](auto&& connectionIdentifier, HTTPCookieAcceptPolicy cookieAcceptPolicy)
mutable {
s/HTTPCookieAcceptPolicy/auto
More information about the webkit-reviews
mailing list