RESOLVED FIXED 151963
[EME] Correctly report errors when generating key requests from AVContentKeySession.
https://bugs.webkit.org/show_bug.cgi?id=151963
Summary [EME] Correctly report errors when generating key requests from AVContentKeyS...
Jer Noble
Reported 2015-12-07 13:51:46 PST
[EME] Correctly report errors when generating key requests from AVContentKeySession.
Attachments
Patch (2.31 KB, patch)
2015-12-07 13:54 PST, Jer Noble
no flags
Patch (39.98 KB, patch)
2016-01-19 11:25 PST, Jer Noble
eric.carlson: review+
Patch for landing (42.45 KB, patch)
2016-01-19 21:51 PST, Jer Noble
no flags
Patch for landing (42.45 KB, patch)
2016-01-19 22:44 PST, Jer Noble
commit-queue: commit-queue-
Jer Noble
Comment 1 2015-12-07 13:54:03 PST
Darin Adler
Comment 2 2015-12-08 09:15:15 PST
Comment on attachment 266809 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=266809&action=review > Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:286 > + NSError* error = nullptr; Style should be: NSError *error = nil; > Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:290 > + systemCode = std::abs(systemCodeForError(error)); The use of std::abs here seems bizarre. Test coverage?
Jer Noble
Comment 3 2015-12-08 10:41:39 PST
(In reply to comment #2) > Comment on attachment 266809 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=266809&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:286 > > + NSError* error = nullptr; > > Style should be: > > NSError *error = nil; Ok. > > Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:290 > > + systemCode = std::abs(systemCodeForError(error)); > > The use of std::abs here seems bizarre. Test coverage? Established in https://bugs.webkit.org/show_bug.cgi?id=138986 / <rdar://problem/19118302>.
Jer Noble
Comment 4 2016-01-19 11:25:25 PST
Jer Noble
Comment 5 2016-01-19 11:26:23 PST
New approach; fix the underlying problem where WebIDL requires a 'unsigned long' to be a 32-bit int, and we are storing the value as a 64-bit int.
Jer Noble
Comment 6 2016-01-19 11:37:22 PST
Ryan Haddad
Comment 7 2016-01-19 19:37:44 PST
This change broke the Windows build: c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.h(47): error C3668: 'WebCore::CDMSessionAVFoundationCF::generateKeyRequest': method with override specifier 'override' did not override any base class methods (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.h(49): error C3668: 'WebCore::CDMSessionAVFoundationCF::update': method with override specifier 'override' did not override any base class methods (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] JSWebKitPlaybackTargetAvailabilityEvent.cpp <https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/75221>
Jer Noble
Comment 8 2016-01-19 21:51:23 PST
Created attachment 269339 [details] Patch for landing Fix the Windows build.
Jer Noble
Comment 9 2016-01-19 22:44:23 PST
Created attachment 269342 [details] Patch for landing
WebKit Commit Bot
Comment 10 2016-01-21 09:15:27 PST
Comment on attachment 269342 [details] Patch for landing Clearing flags on attachment: 269342 Committed r195410: <http://trac.webkit.org/changeset/195410>
WebKit Commit Bot
Comment 11 2016-01-22 10:45:28 PST
Comment on attachment 269342 [details] Patch for landing Rejecting attachment 269342 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 269342, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: ED at 65. Hunk #4 FAILED at 96. 4 out of 4 hunks FAILED -- saving rejects to file Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm.rej patching file Source/WebCore/testing/MockCDM.cpp Hunk #1 FAILED at 44. Hunk #2 FAILED at 112. Hunk #3 FAILED at 128. 3 out of 3 hunks FAILED -- saving rejects to file Source/WebCore/testing/MockCDM.cpp.rej Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/726179
Joseph Pecoraro
Comment 12 2016-09-05 01:24:06 PDT
Comment on attachment 269342 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=269342&action=review > Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:307 > -PassRefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyReleaseMessage(unsigned short& errorCode, unsigned long& systemCode) > +PassRefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyReleaseMessage(unsigned short& errorCode, uint32_t systemCode) The change from reference to non-reference seems unintentional. No caller actually uses the value, but it does get assigned inside this method. The static analyzer complains about the unused values assigned to systemCode.
Note You need to log in before you can comment on or make changes to this bug.