Summary: | Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer, youennf | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Alex Christensen
2020-04-07 12:40:45 PDT
Created attachment 395726 [details]
Patch
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 Created attachment 395728 [details]
Patch
Created attachment 395736 [details]
Patch
Committed r259673: <https://trac.webkit.org/changeset/259673> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395736 [details]. |