New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 655095 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

MediaKeySession::update implementation is not compliant with specification

Reported by pgorszko...@opera.com, Oct 12 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Steps to reproduce the problem:
See current implementation of MediaKeySession::update in third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

What is the expected behavior?

What went wrong?
In current version of specification:https://w3c.github.io/encrypted-media/#update we have:

1. If this object is closed, return a promise rejected with an InvalidStateError.

In current implementation we have:
DCHECK(!m_isClosed);

It should be replaced with implementation what specification says in this case:

1. If this object is closed, return a promise rejected with an InvalidStateError.

Did this work before? No 

Chrome version: <Copy from: 'about:version'>  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 11.2 r202
 
It will be fix in https://codereview.chromium.org/2342953002/
Components: Internals>Media>Encrypted
Labels: -OS-Linux -Type-Feature EME-compat OS-All Type-Bug
Owner: jrumm...@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: M-56 Pri-1
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8446ebfbbd8b1442d41a3109d08f347fb9a6a060

commit 8446ebfbbd8b1442d41a3109d08f347fb9a6a060
Author: jrummell <jrummell@chromium.org>
Date: Tue Oct 18 20:16:39 2016

Update EME errors to use TypeError

The current version of the EME spec has specified that TypeErrors
should be returned in certain cases. Update the EME code to use
TypeError where needed.

As well, verify that MediaKeySession is not callable after close().

BUG= 646902 , 655095 
TEST=EME tests pass

Review-Url: https://codereview.chromium.org/2342953002
Cr-Commit-Position: refs/heads/master@{#426032}

[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/media/blink/cdm_result_promise_helper.cc
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/media/blink/webcontentdecryptionmodulesession_impl.cc
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-clearkey-update-non-ascii-input.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-generate-request-disallowed-input.html
[add] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-not-callable-after-close.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-syntax.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-update-disallowed-input.html
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h

Cc: brajkumar@chromium.org
Labels: Needs-Feedback
Could any one let us know is there any repro steps available for this issue to verify it from chrome-TE end?

Thanks! 
Status: Fixed (was: Assigned)
re #5: I added a test (encrypted-media-not-callable-after-close.html). It has code to verify that calling update() after close() fails.

Sign in to add a comment