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

Unified Diff: content/browser/media/cdm/browser_cdm_manager.cc

Issue 733533002: Do not start RunLoop of MessagePumpForUI in NestedMessagePumpAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use anonymous namespace for CallbackChecker Created 6 years, 1 month 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 | « content/browser/browser_main_runner.cc ('k') | content/public/test/nested_message_pump_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/cdm/browser_cdm_manager.cc
diff --git a/content/browser/media/cdm/browser_cdm_manager.cc b/content/browser/media/cdm/browser_cdm_manager.cc
index 99c763d9360e33824b37a267274d3dc0fa8b0027..92720d3d11f3ed81a1a9f724bd85366bb0c1da57 100644
--- a/content/browser/media/cdm/browser_cdm_manager.cc
+++ b/content/browser/media/cdm/browser_cdm_manager.cc
@@ -81,7 +81,11 @@ BrowserCdmManager::~BrowserCdmManager() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(g_browser_cdm_manager_map.Get().count(render_process_id_));
- g_browser_cdm_manager_map.Get().erase(render_process_id_);
+ // If an entry of |render_process_id| was overwritten, we shouldn't remove
+ // the entry. For example, see FrameTreeBrowserTest.FrameTreeAfterCrash test,
+ // and http://crbug.com/430251.
+ if (g_browser_cdm_manager_map.Get()[render_process_id_] == this)
+ g_browser_cdm_manager_map.Get().erase(render_process_id_);
}
// Makes sure BrowserCdmManager is always deleted on the Browser UI thread.
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | content/public/test/nested_message_pump_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698