WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
210142
Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=210142
Summary
Simplify and fortify network getNetworkProcessConnection and getGPUProcessCon...
Alex Christensen
Reported
2020-04-07 12:40:45 PDT
Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection
Attachments
Patch
(20.17 KB, patch)
2020-04-07 12:50 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(20.47 KB, patch)
2020-04-07 13:14 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(23.42 KB, patch)
2020-04-07 14:14 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-04-07 12:50:03 PDT
Created
attachment 395726
[details]
Patch
youenn fablet
Comment 2
2020-04-07 12:58:15 PDT
Comment on
attachment 395726
[details]
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)](auto&& 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::CreateNetworkConnectionToWebProcess { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() }, [this, weakThis = makeWeakPtr(*this), reply = WTFMove(reply), activity = throttler().backgroundActivity("NetworkProcessProxy::getNetworkProcessConnection"_s)](auto&& connectionIdentifier, HTTPCookieAcceptPolicy cookieAcceptPolicy) mutable {
s/HTTPCookieAcceptPolicy/auto
Alex Christensen
Comment 3
2020-04-07 13:14:47 PDT
Created
attachment 395728
[details]
Patch
Alex Christensen
Comment 4
2020-04-07 14:14:31 PDT
Created
attachment 395736
[details]
Patch
EWS
Comment 5
2020-04-07 15:08:00 PDT
Committed
r259673
: <
https://trac.webkit.org/changeset/259673
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 395736
[details]
.
Radar WebKit Bug Importer
Comment 6
2020-04-07 15:08:14 PDT
<
rdar://problem/61412490
>
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