Skip to content
Commit d6426d7a authored by Thomas Guilbert's avatar Thomas Guilbert Committed by Commit Bot
Browse files

Fix iterator invalidation issue

If a RemotePlayback availabilityCallback invokes watchAvailability(),
it may cause changes to the underlying |availability_callbacks_|. This
can invalidate the iterator we are using to loop over the callbacks.

This CL copies the callbacks to a vector before invoking them, allowing
them to add/remove callbacks without problem.

Bug: 1108497
Change-Id: I78220da0b8e10c1d6c0e4fa5e15ada81f10f8fc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314981


Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791472}
parent 5d523344
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment