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.
Created attachment 363008 [details] Patch
<rdar://problem/48411208>
Created attachment 363010 [details] Patch
Created attachment 363022 [details] Patch
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)".
Created attachment 363103 [details] Patch for landing
Comment on attachment 363103 [details] Patch for landing Clearing flags on attachment: 363103 Committed r242142: <https://trac.webkit.org/changeset/242142>
All reviewed patches have been landed. Closing bug.