Closed Bug 1059043 Opened 10 years ago Closed 10 years ago

[EME] Split MediaKey.createSession into create and load, like recent spec change

Categories

(Core :: Audio/Video, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: eflores)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The EME draft spec changed this week to make MediaKeys.createSession() synchronous, and add an explicit MediaKeySession.generateRequest() method. This splits out the async part of the old MediaKeys.createSession() into its own function. Based on the minutes of the WG meeting, the change was well received, so we may as well make it sooner rather than later.
Nasty race condition, this used to be.
Assignee: cpearce → edwin
Status: NEW → ASSIGNED
Attachment #8488410 - Flags: review?(cpearce)
Comment on attachment 8488410 [details] [diff] [review] 1059043-split-createsession.patch Review of attachment 8488410 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. ::: content/media/eme/MediaKeySession.h @@ +98,5 @@ > const nsString mKeySystem; > nsString mSessionId; > const SessionType mSessionType; > bool mIsClosed; > + bool mIsInitialized; Please make this mIsUninitialized and invert the true/false values, so that it matches the "uninitialized" flag in the spec. ::: content/media/eme/MediaKeys.cpp @@ +342,5 @@ > + NS_WARNING("Received activation for non-existent session!"); > + promise->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR); > + return; > + } > + Assert that the session has a valid sessionId. It should be valid, but we'll be pretty stuffed if it isn't.
Attachment #8488410 - Flags: review?(cpearce) → review+
Comment on attachment 8488410 [details] [diff] [review] 1059043-split-createsession.patch Review of attachment 8488410 [details] [diff] [review]: ----------------------------------------------------------------- Forgot DOM peer review; yelled at by pre-push hook again.
Attachment #8488410 - Flags: review?(bzbarsky)
Attachment #8488410 - Flags: review?(bzbarsky) → review?(bugs)
Comment on attachment 8488410 [details] [diff] [review] 1059043-split-createsession.patch Ok, I was told that best of our best knowledge other implementations will change their MediaKeys implementation too.
Attachment #8488410 - Flags: review?(bugs) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: