Bug 224191

Summary: REGRESSION(r267763) NetworkProcess never terminates
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, ggaren, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Alex Christensen
Reported 2021-04-05 10:15:17 PDT
REGRESSION(r267763) NetworkProcess never terminates
Attachments
Patch (9.11 KB, patch)
2021-04-05 10:19 PDT, Alex Christensen
no flags
Patch (10.06 KB, patch)
2021-04-05 11:32 PDT, Alex Christensen
no flags
Patch (10.81 KB, patch)
2021-04-05 11:54 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2021-04-05 10:19:35 PDT
Alex Christensen
Comment 2 2021-04-05 10:19:38 PDT
Chris Dumez
Comment 3 2021-04-05 10:37:09 PDT
Comment on attachment 425168 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425168&action=review > Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:1289 > + terminate(); Why are we calling terminate() instead of clearing the defaultNetworkProcess (which should deallocate the NetworkProcessProxy and cause the process to go away)? While both are fairly similar, I think clearing the default network process might be nicer for a few reasons: 1. This is what we used to do. When destroying the WebProcessPool, we would deallocate the NetworkProcessProxy and it would just go away (no termination involved) 2. There is a slight risk that there could be code somewhere with a RefPtr<> to a NetworkProcess (e.g. for some kind of transient operation) and terminate would abruptly interrupt the operation instead of letting it finish. 3. Youl will likely run more code doing a termination (due to termination handling) when simple destruction. > Source/WebKit/UIProcess/WebProcessPool.cpp:381 > + NetworkProcessProxy::defaultNetworkProcess()->terminate(); Ditto.
Alex Christensen
Comment 4 2021-04-05 11:32:07 PDT
Chris Dumez
Comment 5 2021-04-05 11:41:41 PDT
Comment on attachment 425178 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425178&action=review r=me with naming change. > Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:104 > +RefPtr<NetworkProcessProxy>& NetworkProcessProxy::defaultNetworkProcessPtr() I think the WebKit pattern is: defaultNetworkProcessIfExists() I don't like the Ptr() naming. When I saw it, it really wasn't clear to me what it meant. If you don't like defaultNetworkProcessIfExists(), I guess we could call this one defaultNetworkProcess() and the one below: ensureDefaultNetworkProcess().
Alex Christensen
Comment 6 2021-04-05 11:54:22 PDT
EWS
Comment 7 2021-04-05 21:03:37 PDT
Committed r275487: <https://commits.webkit.org/r275487> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425181 [details].
Note You need to log in before you can comment on or make changes to this bug.