Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Issue 2342953002: Update EME errors to use TypeError (Closed)

Created:
4 years, 3 months ago by jrummell
Modified:
4 years, 2 months ago
Reviewers:
haraken, xhwang, ddorwin, yhirano
CC:
chromium-reviews, mlamouri+watch-blink_chromium.org, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, blink-reviews, Srirama, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060 Cr-Commit-Position: refs/heads/master@{#426032}

Patch Set 1 #

Total comments: 12

Patch Set 2 : V8ThrowException #

Total comments: 6

Patch Set 3 : comments only #

Total comments: 1

Patch Set 4 : rebase on promise changes #

Total comments: 6

Patch Set 5 : createDOMException #

Total comments: 14

Patch Set 6 : changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -164 lines) Patch
M media/blink/cdm_result_promise_helper.cc View 1 2 3 4 5 1 chunk +8 lines, -3 lines 0 comments Download
M media/blink/webcontentdecryptionmodulesession_impl.cc View 4 chunks +55 lines, -27 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-clearkey-update-non-ascii-input.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-generate-request-disallowed-input.html View 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-not-callable-after-close.html View 1 2 3 4 5 1 chunk +112 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-syntax.html View 1 2 3 9 chunks +14 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-update-disallowed-input.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp View 1 2 3 4 3 chunks +7 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp View 1 2 3 4 4 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp View 1 2 3 4 5 10 chunks +107 lines, -76 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp View 1 2 3 2 chunks +14 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp View 1 2 3 2 chunks +12 lines, -10 lines 0 comments Download
M third_party/WebKit/public/platform/WebContentDecryptionModuleException.h View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 49 (16 generated)
jrummell
PTAL. cc ddorwin@ since it may affect the W3C tests.
4 years, 3 months ago (2016-09-15 19:59:30 UTC) #2
ddorwin
I only skimmed the code. We should be able to eliminate some of the exceptions ...
4 years, 3 months ago (2016-09-15 22:43:04 UTC) #4
haraken
Can we avoid using v8::Exception::TypeError directly and use helper methods on V8ThrowException?
4 years, 3 months ago (2016-09-16 01:17:05 UTC) #6
jrummell
Updated. > Can we avoid using v8::Exception::TypeError directly and use helper methods on > V8ThrowException? ...
4 years, 3 months ago (2016-09-16 23:23:35 UTC) #7
haraken
https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode104 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:104: ScriptState::Scope scope(m_resolver->getScriptState()); You don't need to enter ScriptState::Scope because ...
4 years, 3 months ago (2016-09-16 23:55:21 UTC) #8
jrummell
haraken: If I remove the ScriptState::Scope() the renderer crashes. v8::String::NewExternalOneByte(v8::Isolate*, v8::String::ExternalOneByteStringResource*) blink::StringCache::createStringAndInsertIntoCache(v8::Isolate*, WTF::StringImpl*) blink::StringCache::v8ExternalStringSlow(v8::Isolate*, WTF::StringImpl*) ...
4 years, 3 months ago (2016-09-17 00:49:41 UTC) #9
ddorwin
https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h File third_party/WebKit/public/platform/WebContentDecryptionModuleException.h (right): https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h#newcode10 third_party/WebKit/public/platform/WebContentDecryptionModuleException.h:10: // From http://w3c.github.io/encrypted-media/#exceptions. http*s* please :) https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h#newcode16 third_party/WebKit/public/platform/WebContentDecryptionModuleException.h:16: WebContentDecryptionModuleExceptionUnknownError ...
4 years, 3 months ago (2016-09-19 22:33:53 UTC) #10
haraken
On 2016/09/17 00:49:41, jrummell wrote: > haraken: If I remove the ScriptState::Scope() the renderer crashes. ...
4 years, 3 months ago (2016-09-20 01:29:55 UTC) #11
jrummell
That is what the code did before. However, I'm adding TypeError, which is not a ...
4 years, 3 months ago (2016-09-20 01:38:45 UTC) #12
jrummell
That is what the code did before. However, I'm adding TypeError, which is not a ...
4 years, 3 months ago (2016-09-20 01:38:46 UTC) #13
jrummell
Addressed ddorwin's comments. https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h File third_party/WebKit/public/platform/WebContentDecryptionModuleException.h (right): https://codereview.chromium.org/2342953002/diff/20001/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h#newcode10 third_party/WebKit/public/platform/WebContentDecryptionModuleException.h:10: // From http://w3c.github.io/encrypted-media/#exceptions. On 2016/09/19 22:33:53, ...
4 years, 3 months ago (2016-09-20 01:59:17 UTC) #14
haraken
On 2016/09/20 01:38:46, jrummell wrote: > That is what the code did before. However, I'm ...
4 years, 3 months ago (2016-09-20 02:41:44 UTC) #17
ddorwin
On 2016/09/20 02:41:44, haraken wrote: > On 2016/09/20 01:38:46, jrummell wrote: > > That is ...
4 years, 3 months ago (2016-09-20 04:27:46 UTC) #20
haraken
https://codereview.chromium.org/2342953002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2342953002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode95 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:95: getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&ContentDecryptionModuleResultPromise::rejectInternal, wrapPersistent(this), code, errorMessage)); I begin to think ...
4 years, 3 months ago (2016-09-20 05:22:32 UTC) #21
jrummell
I agree that this code should not be dependent on GC timings. Currently the promise ...
4 years, 3 months ago (2016-09-21 00:43:03 UTC) #22
haraken
On 2016/09/21 00:43:03, jrummell wrote: > I agree that this code should not be dependent ...
4 years, 3 months ago (2016-09-21 02:32:47 UTC) #24
yhirano
On 2016/09/21 02:32:47, haraken wrote: > On 2016/09/21 00:43:03, jrummell wrote: > > I agree ...
4 years, 3 months ago (2016-09-23 04:30:27 UTC) #25
jrummell
On 2016/09/23 04:30:27, yhirano wrote: > On 2016/09/21 02:32:47, haraken wrote: > > On 2016/09/21 ...
4 years, 3 months ago (2016-09-23 20:56:39 UTC) #26
haraken
On 2016/09/23 20:56:39, jrummell wrote: > On 2016/09/23 04:30:27, yhirano wrote: > > On 2016/09/21 ...
4 years, 2 months ago (2016-09-25 23:30:00 UTC) #27
yhirano
> I'm curious why there is a concern whether GC is observable or not. What ...
4 years, 2 months ago (2016-09-26 01:18:27 UTC) #28
yhirano
On 2016/09/26 01:18:27, yhirano wrote: > > I'm curious why there is a concern whether ...
4 years, 2 months ago (2016-09-26 01:24:28 UTC) #29
jrummell
Rebased onto the latest changes (my previous CL changing the promises). With the reformat of ...
4 years, 2 months ago (2016-10-14 20:43:47 UTC) #31
haraken
https://codereview.chromium.org/2342953002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2342953002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode96 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:96: if (code == V8TypeError) { Can you just use ...
4 years, 2 months ago (2016-10-15 01:30:46 UTC) #32
jrummell
Updated to use V8ThrowException::createDOMException() https://codereview.chromium.org/2342953002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2342953002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode96 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:96: if (code == V8TypeError) { ...
4 years, 2 months ago (2016-10-17 18:57:24 UTC) #33
haraken
LGTM on my side.
4 years, 2 months ago (2016-10-17 22:30:37 UTC) #34
xhwang
LGTM with nits. I am not familiar with the blink details so I defer that ...
4 years, 2 months ago (2016-10-17 23:13:56 UTC) #35
jrummell
Thanks for the reviews. https://codereview.chromium.org/2342953002/diff/80001/media/blink/cdm_result_promise_helper.cc File media/blink/cdm_result_promise_helper.cc (right): https://codereview.chromium.org/2342953002/diff/80001/media/blink/cdm_result_promise_helper.cc#newcode43 media/blink/cdm_result_promise_helper.cc:43: // renamed to TYPE_ERROR. http://crbug.com/570216#c11. ...
4 years, 2 months ago (2016-10-18 00:50:39 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2342953002/100001
4 years, 2 months ago (2016-10-18 16:55:32 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/162629)
4 years, 2 months ago (2016-10-18 17:41:25 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2342953002/100001
4 years, 2 months ago (2016-10-18 19:10:43 UTC) #44
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-18 20:17:03 UTC) #46
yhirano
lgtm
4 years, 2 months ago (2016-10-19 01:46:27 UTC) #47
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:02:36 UTC) #49
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/8446ebfbbd8b1442d41a3109d08f347fb9a6a060
Cr-Commit-Position: refs/heads/master@{#426032}

Powered by Google App Engine
This is Rietveld 408576698