Bug 195056 - Remove UserMediaProcessManager processState map
Summary: Remove UserMediaProcessManager processState map
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-26 10:51 PST by youenn fablet
Modified: 2019-02-27 11:53 PST (History)
4 users (show)

See Also:


Attachments
Patch (32.62 KB, patch)
2019-02-26 12:58 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (32.05 KB, patch)
2019-02-26 13:09 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (32.03 KB, patch)
2019-02-26 14:21 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (32.04 KB, patch)
2019-02-27 10:24 PST, youenn fablet
no flags Details | Formatted Diff | Diff

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