Bug 195056

Summary: Remove UserMediaProcessManager processState map
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=195028
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2019-02-26 10:51:08 PST
Following on https://bugs.webkit.org/show_bug.cgi?id=195028, this process/proxy map can break easily.
Instead, we could move the sandbox state to WebProcessProxy and keep a set of all proxies.
Comment 1 youenn fablet 2019-02-26 12:58:28 PST
Created attachment 363008 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-02-26 13:05:25 PST
<rdar://problem/48411208>
Comment 3 youenn fablet 2019-02-26 13:09:02 PST
Created attachment 363010 [details]
Patch
Comment 4 youenn fablet 2019-02-26 14:21:25 PST
Created attachment 363022 [details]
Patch
Comment 5 Eric Carlson 2019-02-27 09:42:22 PST
Comment on attachment 363022 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363022&action=review

> Source/WebKit/ChangeLog:9
> +        To improve on this model, this patch doing the following:

Nit: "this patch doing the following:" -> "this patch does the following:"

> Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:64
> +static HashSet<UserMediaPermissionRequestManagerProxy*>& proxies()
> +{
> +    static NeverDestroyed<HashSet<UserMediaPermissionRequestManagerProxy*>> set;
> +    return set;
> +}
> +
> +void UserMediaPermissionRequestManagerProxy::forEach(const WTF::Function<void(UserMediaPermissionRequestManagerProxy&)>& function)
> +{
> +    for (auto* proxy : proxies())
> +        function(*proxy);
> +}

Nit: this should be in "#if ENABLE(MEDIA_STREAM)".
Comment 6 youenn fablet 2019-02-27 10:24:19 PST
Created attachment 363103 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-02-27 11:53:47 PST
Comment on attachment 363103 [details]
Patch for landing

Clearing flags on attachment: 363103

Committed r242142: <https://trac.webkit.org/changeset/242142>
Comment 8 WebKit Commit Bot 2019-02-27 11:53:49 PST
All reviewed patches have been landed.  Closing bug.