Address deadlock
[ Merge of http://go/wvgerrit/51322 ] This avoids taking the session_map_lock_ twice. Bug: 80248149 Test: WV unit/integration tests, GtsMediaTestCases, 2 days of netflix playback. Change-Id: Iea1c7b7ba08d7d40c227d21c5abfce13c0a8b395
This commit is contained in:
@@ -1655,13 +1655,15 @@ void CdmEngine::OnTimerEvent() {
|
||||
bool is_initial_usage_update = false;
|
||||
bool is_usage_update_needed = false;
|
||||
|
||||
{
|
||||
AutoLock lock(session_map_lock_);
|
||||
CdmSessionList sessions;
|
||||
session_map_.GetSessionList(sessions);
|
||||
|
||||
while (!sessions.empty()) {
|
||||
is_initial_usage_update =
|
||||
is_initial_usage_update || sessions.front()->is_initial_usage_update();
|
||||
is_initial_usage_update ||
|
||||
sessions.front()->is_initial_usage_update();
|
||||
is_usage_update_needed =
|
||||
is_usage_update_needed || sessions.front()->is_usage_update_needed();
|
||||
|
||||
@@ -1703,6 +1705,7 @@ void CdmEngine::OnTimerEvent() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CloseExpiredReleaseSessions();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user