Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(919)

Unified Diff: content/browser/media/session/media_session_impl.cc

Issue 2782053002: MediaSession: Stop observers on MediaSession destruction (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/media_session_impl.cc
diff --git a/content/browser/media/session/media_session_impl.cc b/content/browser/media/session/media_session_impl.cc
index e2e554653b7c795504b18975930c0d1d8b468722..c9a513b50b453629502e9a7492fd9569d41d93e2 100644
--- a/content/browser/media/session/media_session_impl.cc
+++ b/content/browser/media/session/media_session_impl.cc
@@ -95,6 +95,8 @@ MediaSessionImpl::~MediaSessionImpl() {
DCHECK(audio_focus_state_ == State::INACTIVE);
for (auto& observer : observers_)
observer.MediaSessionDestroyed();
+ for (auto& observer : observers_)
+ observer.StopObserving();
derekjchow 2017/03/29 00:50:17 Probably makes sense to fuse the two for loops.
seantopping 2017/03/29 00:56:40 Done.
}
void MediaSessionImpl::WebContentsDestroyed() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698