Remove redundant OnMediaItemUIDestroyed() calls
Since MediaItemUIObserverSet::OnMediaItemUIDestroyed() already observes for MediaItemUIView destruction and will stop observing MediaItemUIView, the owner class of MediaItemUIObserverSet does not need to observe OnMediaItemUIDestroyed() again. Also fix MediaItemUIObserverSet::Observe() to remove any pre-existing MediaItemUIView that has the same ID as observer before starting to observe the new MediaItemUIView. See if any of these fixes can stop the crashes. Bug: 330171266 Change-Id: I3a8cc6ac1fd607c3b4d32f15bc145480a56ee0c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5403987 Reviewed-by:Tommy Steimel <steimel@chromium.org> Commit-Queue: Yiren Wang <yrw@chromium.org> Cr-Commit-Position: refs/heads/main@{#1280471}
Loading
Please register or sign in to comment