Cleanup mojo Receivers for media::mojom::MediaPlayer on disconnection
Since there might be more than one mojo Remote for this mojo interface in the browser process at a given time (e.g. one for the regular media session and another one for a PiP session), it would be good to make sure we don't unnecessarily end up with unbound receivers in the set owned by HTMLMediaElement when only one of those remotes are removed. Thus, this CL adds the extra plumbing required in HeapMojoReceiverSet to allow setting disconnect_handlers on the wrapped mojo::ReceiverSet and uses it to make sure that unbound remotes on the browser process for the media::mojom::MediaPlayer interface result in the associated mojo receiver being removed in the renderer process. Bug: 1039252 Change-Id: I7140345658d1b5c30b5aee437285b55251452390 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595047Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Mario Sanchez Prada <mario@igalia.com> Cr-Commit-Position: refs/heads/master@{#838000}
Showing
Please register or sign in to comment