Bug 227468 - NetworkProcessProxy::networkProcessDidTerminate() should copy process pools before iterating over them
Summary: NetworkProcessProxy::networkProcessDidTerminate() should copy process pools b...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-28 15:54 PDT by Chris Dumez
Modified: 2021-06-28 17:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.65 KB, patch)
2021-06-28 15:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.21 KB, patch)
2021-06-28 16:27 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>