Bug 227468

Summary: NetworkProcessProxy::networkProcessDidTerminate() should copy process pools before iterating over them
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ggaren, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2021-06-28 15:54:50 PDT
NetworkProcessProxy::networkProcessDidTerminate() should copy process pools before iterating over them.
Comment 1 Chris Dumez 2021-06-28 15:55:58 PDT
Created attachment 432437 [details]
Patch
Comment 2 Alex Christensen 2021-06-28 15:57:36 PDT
Comment on attachment 432437 [details]
Patch

WebProcessPool::allProcessPools should probably return a Vector<Ref<WebProcessPool>>
Comment 3 Chris Dumez 2021-06-28 15:59:24 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 432437 [details]
> Patch
> 
> WebProcessPool::allProcessPools should probably return a
> Vector<Ref<WebProcessPool>>

Seems like this would be unnecessarily inefficient for call sites that do not need copying/ref'ing (e.g. the ones that only do IPC).
Comment 4 Alex Christensen 2021-06-28 15:59:51 PDT
Comment on attachment 432437 [details]
Patch

It would also be safer.
Comment 5 Chris Dumez 2021-06-28 16:27:34 PDT
Created attachment 432440 [details]
Patch
Comment 6 EWS 2021-06-28 17:25:02 PDT
Committed r279354 (239222@main): <https://commits.webkit.org/239222@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432440 [details].
Comment 7 Radar WebKit Bug Importer 2021-06-28 17:26:25 PDT
<rdar://problem/79890078>