w3c / encrypted-media

Encrypted Media Extensions
https://w3c.github.io/encrypted-media/
Other
180 stars 79 forks source link

Operations are allowed after close() is called but before the session is actually closed #365

Closed jrummell-chromium closed 7 years ago

jrummell-chromium commented 7 years ago

MediaKeySession.close() specifies: step 2: If session is closed, return a resolved promise. step 5.3: Queue a task to run the following steps: step 5.3.1: Run the Session Closed algorithm on the session.

However, the definition of "closed" from step 2 states "MediaKeySession object is closed if and only if the Session Closed algorithm has been run." Depending upon timing, it is possible that an application could call close() multiple times before the Session Closed algorithm has actually run.

This would apply to any operation that checks "if the session is closed ..." before running steps in a separate task.

ddorwin commented 7 years ago

PR #421.