Fix msan problem in MultiProfileFileManagerBrowserTest
The cause is a typical mojo message race. SessionController and MediaController use different mojo message pipes. The problem happens when two or more users are added to the system and somehow MediaController call is delayed after SessionController calls. As a result, MediaController calls contains a stale capture states array (less than actual users). MultiProfileMediaTrayView uses a user index based on SessionController's view and would hit an index out of bound error when accessing the stale data. Make MultiProfileMediaTrayView::OnMediaCaptureChanged use size of the passed-in |capture_states| to fix the problem. This should be fine since it is transient and there should soon be another MediaController::NotifyCaptureState call. Bug: 842442 Change-Id: Ife6ea23c85d27e2e89a042bb849ef03af4ccc061 Reviewed-on: https://chromium-review.googlesource.com/1062716Reviewed-by:Noel Gordon <noel@chromium.org> Commit-Queue: Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#559323}
Showing
Please register or sign in to comment