Bug 222575

Summary: Have WebProcessPool::processForRegistrableDomain() return a Ref<WebProcessProxy>
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, ggaren, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2021-03-01 14:14:16 PST
Have WebProcessPool::processForRegistrableDomain() return a Ref<WebProcessProxy> instead of a WebProcessProxy&, for extra safety. Returning a WebProcessProxy& is generally safe because the WebProcessPool is expected to hold a reference to the WebProcessProxy (via WebProcessPool::m_processes) it is returning. However, this is a bit fragile and can lead to bad bugs as we've seen recently.
Attachments
Patch (7.82 KB, patch)
2021-03-01 14:15 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-03-01 14:15:46 PST
Geoffrey Garen
Comment 2 2021-03-01 14:28:26 PST
Comment on attachment 421865 [details] Patch r=me
EWS
Comment 3 2021-03-01 14:58:06 PST
Committed r273693: <https://commits.webkit.org/r273693> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421865 [details].
Radar WebKit Bug Importer
Comment 4 2021-03-01 14:59:14 PST
Note You need to log in before you can comment on or make changes to this bug.