[encrypted-media] Operations are allowed after close() is called but before the session is actually closed

jrummell-chromium has just created a new issue for 
https://github.com/w3c/encrypted-media:

== Operations are allowed after close() is called but before the 
session is actually closed ==
 
[MediaKeySession.close()](http://w3c.github.io/encrypted-media/#dom-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"](http://w3c.github.io/encrypted-media/#media-key-session-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.

Please view or discuss this issue at 
https://github.com/w3c/encrypted-media/issues/365 using your GitHub 
account

Received on Friday, 2 December 2016 21:01:45 UTC