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

Unified Diff: content/browser/media/media_web_contents_observer.cc

Issue 325363002: Fix BrowserMediaPlayerManager and BrowserCdmManager destruction order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 6 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 | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_web_contents_observer.cc
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc
index de1fb89adc4f6e24ec7840a00701453f7d4bf819..d23bd3299c5dbbd54d0863b848654e2bbe700e21 100644
--- a/content/browser/media/media_web_contents_observer.cc
+++ b/content/browser/media/media_web_contents_observer.cc
@@ -31,10 +31,12 @@ MediaWebContentsObserver::~MediaWebContentsObserver() {
void MediaWebContentsObserver::RenderFrameDeleted(
RenderFrameHost* render_frame_host) {
uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
- cdm_managers_.erase(key);
+ // Always destroy the media players before CDMs because we do not support
+ // detaching CDMs from media players yet. See http://crbug.com/330324
#if defined(OS_ANDROID)
media_player_managers_.erase(key);
#endif
+ cdm_managers_.erase(key);
}
bool MediaWebContentsObserver::OnMessageReceived(
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698