[Bug 17750] Define the behavior MediaKeySession close() and clearing the keys attribute

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17750

--- Comment #26 from Adrian Bateman [MSFT] <adrianba@microsoft.com> ---
(In reply to David Dorwin from comment #25)
> Do we need to explicitly handle release() being called in the CREATED state? 

The behaviour of release() is implementation specific. There is no requirement
to do anything with release(). If the implementation does cause a close to
occur, the spec already allows moving from CREATED to CLOSED at any point
(either because of release() or because the CDM wants to close the session).

> createSession(), loadSession(), and release() all schedule tasks to do their
> work. Are these tasks required to run serially? (If so, does the spec need
> to be more explicit about this or is this implied by "schedule a task"?) If
> not, the createSession() task may not complete before release() is called.

I think we need to change the createSession/loadSession task steps to say Spin
the event loop until the MediaKeys constructor task is complete. The MediaKeys
constructor task should say to spin the event loop until the CDM is loaded and
initialized (step 2). Then we will need to handle release() being called before
the session is completely created/loaded.

> It may actually be that we need to handle this in createSession() and
> loadSession() by adding a condition to check for a release as the first
> condition in the last substep of the "Schedule a task" step.

Perhaps all we need to do here is to make the first step of the release task
spin the event loop until the MediaKeys constructor task is complete?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 21 February 2014 21:59:18 UTC