Changeset 195335 in webkit
- Timestamp:
- Jan 19, 2016 7:50:50 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r195322 r195335 1 2016-01-19 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r195302. 4 https://bugs.webkit.org/show_bug.cgi?id=153267 5 6 This change broke the Windows build, rolling out so it isn't 7 broken all night before investigation. (Requested by 8 ryanhaddad on #webkit). 9 10 Reverted changeset: 11 12 "[EME] Correctly report errors when generating key requests 13 from AVContentKeySession." 14 https://bugs.webkit.org/show_bug.cgi?id=151963 15 http://trac.webkit.org/changeset/195302 16 1 17 2016-01-19 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/Modules/encryptedmedia/CDM.h
r195302 r195335 56 56 explicit CDM(const String& keySystem); 57 57 58 enum CDMErrorCode { NoError, UnknownError, ClientError, ServiceError, OutputError, HardwareChangeError, DomainError };58 enum CDMErrorCode { UnknownError = 1, ClientError, ServiceError, OutputError, HardwareChangeError, DomainError }; 59 59 static bool supportsKeySystem(const String&); 60 60 static bool keySystemSupportsMimeType(const String& keySystem, const String& mimeType); -
trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp
r195302 r195335 70 70 } 71 71 72 RefPtr<Uint8Array> CDMSessionClearKey::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode)72 RefPtr<Uint8Array> CDMSessionClearKey::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) 73 73 { 74 74 UNUSED_PARAM(mimeType); … … 97 97 } 98 98 99 bool CDMSessionClearKey::update(Uint8Array* rawKeysData, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode)99 bool CDMSessionClearKey::update(Uint8Array* rawKeysData, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) 100 100 { 101 101 UNUSED_PARAM(nextMessage); -
trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h
r195302 r195335 43 43 virtual void setClient(CDMSessionClient* client) override { m_client = client; } 44 44 virtual const String& sessionId() const override { return m_sessionId; } 45 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array*, String&, unsigned short&, u int32_t&) override;45 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array*, String&, unsigned short&, unsigned long&) override; 46 46 virtual void releaseKeys() override; 47 virtual bool update(Uint8Array*, RefPtr<Uint8Array>&, unsigned short&, u int32_t&) override;47 virtual bool update(Uint8Array*, RefPtr<Uint8Array>&, unsigned short&, unsigned long&) override; 48 48 virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) const override; 49 49 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp
r195302 r195335 112 112 String destinationURL; 113 113 MediaKeyError::Code errorCode = 0; 114 u int32_tsystemCode = 0;114 unsigned long systemCode = 0; 115 115 116 116 // 3. Use cdm to generate a key request and follow the steps for the first matching condition from the following list: … … 164 164 RefPtr<Uint8Array> pendingKey = m_pendingKeys.takeFirst(); 165 165 unsigned short errorCode = 0; 166 u int32_tsystemCode = 0;166 unsigned long systemCode = 0; 167 167 168 168 // NOTE: Continued from step 2. of MediaKeySession::update() … … 220 220 } 221 221 222 void MediaKeySession::sendError(CDMSessionClient::MediaKeyErrorCode errorCode, u int32_tsystemCode)222 void MediaKeySession::sendError(CDMSessionClient::MediaKeyErrorCode errorCode, unsigned long systemCode) 223 223 { 224 224 Ref<MediaKeyError> error = MediaKeyError::create(errorCode, systemCode).get(); -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h
r195302 r195335 87 87 // CDMSessionClient 88 88 virtual void sendMessage(Uint8Array*, String destinationURL) override; 89 virtual void sendError(MediaKeyErrorCode, u int32_tsystemCode) override;89 virtual void sendError(MediaKeyErrorCode, unsigned long systemCode) override; 90 90 virtual String mediaKeysStorageDirectory() const override; 91 91 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r195317 r195335 6069 6069 CDC8B5AB18047FF10016E685 /* SourceBufferPrivateAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */; }; 6070 6070 CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */; }; 6071 CDC979F41C498C0900DB50D4 /* WebCoreNSErrorExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */; };6072 CDC979F51C498C0900DB50D4 /* WebCoreNSErrorExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */; };6073 6071 CDCA82961679100F00875714 /* TextTrackRepresentationIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA82941679100F00875714 /* TextTrackRepresentationIOS.mm */; }; 6074 6072 CDCA98EB18B2C8EB00C12FF9 /* CDMPrivateMediaPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCA98EA18B2C8EB00C12FF9 /* CDMPrivateMediaPlayer.cpp */; }; … … 13950 13948 CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferPrivateAVFObjC.h; sourceTree = "<group>"; }; 13951 13949 CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferPrivateClient.h; sourceTree = "<group>"; }; 13952 CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSErrorExtras.mm; sourceTree = "<group>"; };13953 CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreNSErrorExtras.h; sourceTree = "<group>"; };13954 13950 CDCA82941679100F00875714 /* TextTrackRepresentationIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextTrackRepresentationIOS.mm; sourceTree = "<group>"; }; 13955 13951 CDCA98E918B2C8D000C12FF9 /* CDMPrivateMediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMPrivateMediaPlayer.h; sourceTree = "<group>"; }; … … 19753 19749 310D71941B335C9D009C7B73 /* ThemeCocoa.h */, 19754 19750 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */, 19755 CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */,19756 CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */,19757 19751 ); 19758 19752 path = cocoa; … … 26644 26638 BC5EBA110E823E4700B25965 /* KeyframeList.h in Headers */, 26645 26639 E15FF7D518C9553800FE4C87 /* KeypressCommand.h in Headers */, 26646 CDC979F51C498C0900DB50D4 /* WebCoreNSErrorExtras.h in Headers */,26647 26640 521D46F811AEC9B100514613 /* KillRing.h in Headers */, 26648 26641 450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */, … … 28848 28841 BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */, 28849 28842 49AE2D8E134EE50C0072920A /* CSSCalculationValue.cpp in Sources */, 28850 CDC979F41C498C0900DB50D4 /* WebCoreNSErrorExtras.mm in Sources */,28851 28843 BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */, 28852 28844 E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */, -
trunk/Source/WebCore/html/MediaKeyError.h
r195302 r195335 47 47 typedef unsigned short Code; 48 48 49 static Ref<MediaKeyError> create(Code code, u int32_tsystemCode = 0) { return adoptRef(*new MediaKeyError(code, systemCode)); }49 static Ref<MediaKeyError> create(Code code, unsigned long systemCode = 0) { return adoptRef(*new MediaKeyError(code, systemCode)); } 50 50 51 51 Code code() const { return m_code; } 52 u int32_tsystemCode() { return m_systemCode; }52 unsigned long systemCode() { return m_systemCode; } 53 53 54 54 private: -
trunk/Source/WebCore/html/MediaKeyEvent.h
r195302 r195335 43 43 String defaultURL; 44 44 RefPtr<MediaKeyError> errorCode; 45 u int32_t systemCode;45 unsigned short systemCode; 46 46 }; 47 47 -
trunk/Source/WebCore/platform/graphics/CDMSession.h
r195302 r195335 50 50 }; 51 51 typedef unsigned short MediaKeyErrorCode; 52 virtual void sendError(MediaKeyErrorCode, u int32_tsystemCode) = 0;52 virtual void sendError(MediaKeyErrorCode, unsigned long systemCode) = 0; 53 53 54 54 virtual String mediaKeysStorageDirectory() const = 0; … … 71 71 virtual void setClient(CDMSessionClient*) = 0; 72 72 virtual const String& sessionId() const = 0; 73 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode) = 0;73 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) = 0; 74 74 virtual void releaseKeys() = 0; 75 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode) = 0;75 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) = 0; 76 76 virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) const { return nullptr; } 77 77 }; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h
r195302 r195335 50 50 // CDMSession 51 51 virtual CDMSessionType type() override { return CDMSessionTypeAVContentKeySession; } 52 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode) override;52 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override; 53 53 virtual void releaseKeys() override; 54 virtual bool update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode) override;54 virtual bool update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override; 55 55 56 56 // CDMSessionMediaSourceAVFObjC … … 61 61 62 62 protected: 63 PassRefPtr<Uint8Array> generateKeyReleaseMessage(unsigned short& errorCode, u int32_t& systemCode);63 PassRefPtr<Uint8Array> generateKeyReleaseMessage(unsigned short& errorCode, unsigned long& systemCode); 64 64 65 65 bool hasContentKeySession() const { return m_contentKeySession; } -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
r195302 r195335 38 38 #import "SourceBufferPrivateAVFObjC.h" 39 39 #import "UUID.h" 40 #import "WebCoreNSErrorExtras.h"41 40 #import <AVFoundation/AVError.h> 42 41 #import <CoreMedia/CMBase.h> 42 #import <cstdlib> 43 43 #import <objc/objc-runtime.h> 44 44 #import <runtime/TypedArrayInlines.h> … … 145 145 } 146 146 147 RefPtr<Uint8Array> CDMSessionAVContentKeySession::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode)147 RefPtr<Uint8Array> CDMSessionAVContentKeySession::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) 148 148 { 149 149 UNUSED_PARAM(mimeType); … … 229 229 } 230 230 231 bool CDMSessionAVContentKeySession::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode)231 bool CDMSessionAVContentKeySession::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) 232 232 { 233 233 UNUSED_PARAM(nextMessage); … … 282 282 errorCode = MediaPlayer::NoError; 283 283 systemCode = 0; 284 NSError* error = nil; 285 NSData* requestData = [m_keyRequest contentKeyRequestDataForApp:certificateData.get() contentIdentifier:nil options:options.get() error:&error]; 286 if (error) { 287 errorCode = MediaPlayerClient::DomainError; 288 systemCode = mediaKeyErrorSystemCode(error); 289 return false; 290 } 291 284 NSData* requestData = [m_keyRequest contentKeyRequestDataForApp:certificateData.get() contentIdentifier:nil options:options.get() error:nil]; 292 285 nextMessage = Uint8Array::create(static_cast<const uint8_t*>([requestData bytes]), [requestData length]); 286 293 287 return false; 294 288 } … … 313 307 } 314 308 315 PassRefPtr<Uint8Array> CDMSessionAVContentKeySession::generateKeyReleaseMessage(unsigned short& errorCode, u int32_t& systemCode)309 PassRefPtr<Uint8Array> CDMSessionAVContentKeySession::generateKeyReleaseMessage(unsigned short& errorCode, unsigned long& systemCode) 316 310 { 317 311 ASSERT(m_mode == KeyRelease); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h
r195302 r195335 46 46 virtual void setClient(CDMSessionClient* client) override { m_client = client; } 47 47 virtual const String& sessionId() const override { return m_sessionId; } 48 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode) override;48 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override; 49 49 virtual void releaseKeys() override; 50 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode) override;50 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override; 51 51 52 52 protected: -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm
r195302 r195335 36 36 #import "SoftLinking.h" 37 37 #import "UUID.h" 38 #import "WebCoreNSErrorExtras.h"39 38 #import <AVFoundation/AVFoundation.h> 40 39 #import <objc/objc-runtime.h> … … 55 54 } 56 55 57 RefPtr<Uint8Array> CDMSessionAVFoundationObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode)56 RefPtr<Uint8Array> CDMSessionAVFoundationObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) 58 57 { 59 58 UNUSED_PARAM(mimeType); … … 63 62 RefPtr<Uint8Array> certificate; 64 63 if (!MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData(initData, keyURI, keyID, certificate)) { 65 errorCode = CDM::UnknownError;64 errorCode = MediaPlayer::InvalidPlayerState; 66 65 return nullptr; 67 66 } … … 69 68 m_request = m_parent->takeRequestForKeyURI(keyURI); 70 69 if (!m_request) { 71 errorCode = CDM::UnknownError;70 errorCode = MediaPlayer::InvalidPlayerState; 72 71 return nullptr; 73 72 } … … 80 79 81 80 if (!keyRequest) { 82 errorCode = CDM::DomainError;83 systemCode = mediaKeyErrorSystemCode(nsError);81 NSError* underlyingError = [[nsError userInfo] objectForKey:NSUnderlyingErrorKey]; 82 systemCode = [underlyingError code]; 84 83 return nullptr; 85 84 } … … 97 96 } 98 97 99 bool CDMSessionAVFoundationObjC::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode)98 bool CDMSessionAVFoundationObjC::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) 100 99 { 101 100 RetainPtr<NSData> keyData = adoptNS([[NSData alloc] initWithBytes:key->baseAddress() length:key->byteLength()]); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h
r195302 r195335 48 48 // CDMSession 49 49 virtual CDMSessionType type() override { return CDMSessionTypeAVStreamSession; } 50 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode) override;50 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override; 51 51 virtual void releaseKeys() override; 52 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode) override;52 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override; 53 53 54 54 // CDMSessionMediaSourceAVFObjC … … 59 59 60 60 protected: 61 PassRefPtr<Uint8Array> generateKeyReleaseMessage(unsigned short& errorCode, u int32_tsystemCode);61 PassRefPtr<Uint8Array> generateKeyReleaseMessage(unsigned short& errorCode, unsigned long& systemCode); 62 62 63 63 WeakPtrFactory<CDMSessionAVStreamSession> m_weakPtrFactory; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm
r195302 r195335 38 38 #import "SourceBufferPrivateAVFObjC.h" 39 39 #import "UUID.h" 40 #import "WebCoreNSErrorExtras.h"41 40 #import <AVFoundation/AVError.h> 42 41 #import <CoreMedia/CMBase.h> 42 #import <cstdlib> 43 43 #import <objc/objc-runtime.h> 44 44 #import <runtime/TypedArrayInlines.h> … … 113 113 } 114 114 115 RefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode)115 RefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) 116 116 { 117 117 UNUSED_PARAM(mimeType); … … 188 188 } 189 189 190 bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode)190 bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) 191 191 { 192 192 bool shouldGenerateKeyRequest = !m_certificate || isEqual(key, "renew"); … … 256 256 LOG(Media, "CDMSessionAVStreamSession::update(%p) - error:%@", this, [error description]); 257 257 errorCode = MediaPlayer::InvalidPlayerState; 258 systemCode = mediaKeyErrorSystemCode(error);258 systemCode = std::abs(systemCodeForError(error)); 259 259 return false; 260 260 } … … 305 305 } 306 306 307 PassRefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyReleaseMessage(unsigned short& errorCode, u int32_tsystemCode)307 PassRefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyReleaseMessage(unsigned short& errorCode, unsigned long& systemCode) 308 308 { 309 309 ASSERT(m_mode == KeyRelease); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h
r195302 r195335 64 64 65 65 protected: 66 static long systemCodeForError(NSError *); 66 67 String storagePath() const; 67 68 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm
r195302 r195335 31 31 #import "CDMPrivateMediaSourceAVFObjC.h" 32 32 #import "FileSystem.h" 33 #import "WebCoreNSErrorExtras.h"34 33 #import <AVFoundation/AVError.h> 34 #import <cstdlib> 35 35 36 36 namespace WebCore { … … 53 53 return; 54 54 55 unsigned long code = mediaKeyErrorSystemCode(error);55 unsigned long code = std::abs(systemCodeForError(error)); 56 56 57 57 // FIXME(142246): Remove the following once <rdar://problem/20027434> is resolved. … … 66 66 return; 67 67 68 unsigned long code = mediaKeyErrorSystemCode(error);68 unsigned long code = std::abs(systemCodeForError(error)); 69 69 70 70 // FIXME(142246): Remove the following once <rdar://problem/20027434> is resolved. … … 97 97 } 98 98 99 long CDMSessionMediaSourceAVFObjC::systemCodeForError(NSError *error) 100 { 101 NSInteger code = [error code]; 102 if (code != AVErrorUnknown) 103 return code; 104 105 NSError* underlyingError = [error.userInfo valueForKey:NSUnderlyingErrorKey]; 106 if (!underlyingError || ![underlyingError isKindOfClass:[NSError class]]) 107 return code; 108 109 return [underlyingError code]; 110 } 111 99 112 String CDMSessionMediaSourceAVFObjC::storagePath() const 100 113 { -
trunk/Source/WebCore/testing/MockCDM.cpp
r195302 r195335 45 45 virtual void setClient(CDMSessionClient* client) override { m_client = client; } 46 46 virtual const String& sessionId() const override { return m_sessionId; } 47 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, u int32_t& systemCode) override;47 virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override; 48 48 virtual void releaseKeys() override; 49 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, u int32_t& systemCode) override;49 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override; 50 50 51 51 protected: … … 113 113 } 114 114 115 RefPtr<Uint8Array> MockCDMSession::generateKeyRequest(const String&, Uint8Array* initData, String&, unsigned short& errorCode, u int32_t&)115 RefPtr<Uint8Array> MockCDMSession::generateKeyRequest(const String&, Uint8Array* initData, String&, unsigned short& errorCode, unsigned long&) 116 116 { 117 117 for (unsigned i = 0; i < initDataPrefix()->length(); ++i) { … … 129 129 } 130 130 131 bool MockCDMSession::update(Uint8Array* key, RefPtr<Uint8Array>&, unsigned short& errorCode, u int32_t&)131 bool MockCDMSession::update(Uint8Array* key, RefPtr<Uint8Array>&, unsigned short& errorCode, unsigned long&) 132 132 { 133 133 for (unsigned i = 0; i < keyPrefix()->length(); ++i) {
Note: See TracChangeset
for help on using the changeset viewer.