Stop policy timer before invoking session destructor

The CDM session was being destroyed before the policy timer was stopped
and before the session was removed from a list of active sessions. This
allowed race conditions, where the policy timer would try to evaluate
policy for a closed session. This led to segfaults.
b/11338324

Merge of https://widevine-internal-review.googlesource.com/#/c/8240/1
from the widevine cdm repo.

Change-Id: Ib159ccfdb763a47da573f5c06c0793c2c63886c4
This commit is contained in:
Jeff Tinker
2013-10-25 10:50:02 -07:00
parent 6fc2ee33c3
commit 49e593d127
2 changed files with 8 additions and 6 deletions

View File

@@ -114,7 +114,7 @@ class CdmEngine : public TimerHandler {
// timer related methods to drive policy decisions
virtual void EnablePolicyTimer();
virtual void DisablePolicyTimer();
virtual void DisablePolicyTimer(bool force);
virtual void OnTimerEvent();
virtual void OnKeyReleaseEvent(const CdmKeySetId& key_set_id);