Changeset 237493 in webkit
- Timestamp:
- Oct 27, 2018, 8:34:35 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
Modules/encryptedmedia/MediaKeySession.cpp (modified) (11 diffs)
-
Modules/encryptedmedia/MediaKeys.cpp (modified) (2 diffs)
-
Modules/encryptedmedia/NavigatorEME.cpp (modified) (3 diffs)
-
platform/Logging.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237488 r237493 1 2018-10-27 Charlie Turner <cturner@igalia.com> 2 3 [EME] Add a logging macro 4 https://bugs.webkit.org/show_bug.cgi?id=190984 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 No tests since no new functionality. 9 10 * Modules/encryptedmedia/MediaKeySession.cpp: 11 (WebCore::MediaKeySession::MediaKeySession): 12 (WebCore::MediaKeySession::generateRequest): 13 (WebCore::MediaKeySession::update): 14 (WebCore::MediaKeySession::close): 15 (WebCore::MediaKeySession::remove): 16 (WebCore::MediaKeySession::sessionClosed): 17 * Modules/encryptedmedia/MediaKeys.cpp: 18 (WebCore::MediaKeys::createSession): 19 * Modules/encryptedmedia/NavigatorEME.cpp: 20 (WebCore::NavigatorEME::requestMediaKeySystemAccess): 21 * platform/Logging.h: 22 1 23 2018-10-27 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 24 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp
r236462 r237493 36 36 #include "Document.h" 37 37 #include "EventNames.h" 38 #include "Logging.h" 38 39 #include "MediaKeyMessageEvent.h" 39 40 #include "MediaKeyMessageType.h" … … 70 71 // W3C Editor's Draft 09 November 2016 71 72 // createSession(), ctd. 73 74 LOG(EME, "EME - new session created"); 72 75 73 76 // 3.1. Let the sessionId attribute be the empty string. … … 121 124 // 1. If this object is closed, return a promise rejected with an InvalidStateError. 122 125 // 2. If this object's uninitialized value is false, return a promise rejected with an InvalidStateError. 126 LOG(EME, "EME - generate request"); 127 123 128 if (m_closed || !m_uninitialized) { 124 129 promise->reject(InvalidStateError); … … 195 200 } 196 201 202 LOG(EME, "EME - request license from CDM implementation"); 197 203 m_instanceSession->requestLicense(m_sessionType, initDataType, WTFMove(initData), [this, weakThis = makeWeakPtr(*this), promise = WTFMove(promise)] (Ref<SharedBuffer>&& message, const String& sessionId, bool needsIndividualization, CDMInstanceSession::SuccessValue succeeded) mutable { 198 204 if (!weakThis) … … 360 366 // 1. If this object is closed, return a promise rejected with an InvalidStateError. 361 367 // 2. If this object's callable value is false, return a promise rejected with an InvalidStateError. 368 LOG(EME, "EME - update session for %s", m_sessionId.utf8().data()); 369 362 370 if (m_closed || !m_callable) { 363 371 promise->reject(InvalidStateError); … … 416 424 417 425 if (succeeded == CDMInstanceSession::SuccessValue::Failed) { 426 LOG(EME, "EME - failed to update CDM license for %s", m_sessionId.utf8().data()); 418 427 promise->reject(TypeError); 419 428 return; … … 425 434 // 6.8. Queue a task to run the following steps: 426 435 m_taskQueue.enqueueTask([this, sessionWasClosed, changedKeys = WTFMove(changedKeys), changedExpiration = WTFMove(changedExpiration), message = WTFMove(message), promise = WTFMove(promise)] () mutable { 436 LOG(EME, "EME - updating CDM license succeeded for session %s, sending a message to the license server", m_sessionId.utf8().data()); 427 437 // 6.8.1. 428 438 if (sessionWasClosed) { … … 485 495 // 1. Let session be the associated MediaKeySession object. 486 496 // 2. If session is closed, return a resolved promise. 497 LOG(EME, "EME - closing session %s", m_sessionId.utf8().data()); 498 487 499 if (m_closed) { 488 500 promise->resolve(); … … 501 513 // 5.1. Let cdm be the CDM instance represented by session's cdm instance value. 502 514 // 5.2. Use cdm to close the key session associated with session. 515 LOG(EME, "EME - closing CDM session %s", m_sessionId.utf8().data()); 503 516 m_instanceSession->closeSession(m_sessionId, [this, weakThis = makeWeakPtr(*this), promise = WTFMove(promise)] () mutable { 504 517 if (!weakThis) … … 526 539 // 1. If this object is closed, return a promise rejected with an InvalidStateError. 527 540 // 2. If this object's callable value is false, return a promise rejected with an InvalidStateError. 541 LOG(EME, "EME - removing session %s", m_sessionId.utf8().data()); 542 528 543 if (m_closed || !m_callable) { 529 544 promise->reject(InvalidStateError); … … 661 676 // https://w3c.github.io/encrypted-media/#session-closed 662 677 // W3C Editor's Draft 09 November 2016 678 LOG(EME, "EME - session %s was closed", m_sessionId.utf8().data()); 663 679 664 680 // 1. Let session be the associated MediaKeySession object. -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp
r236317 r237493 35 35 #include "CDMClient.h" 36 36 #include "CDMInstance.h" 37 #include "Logging.h" 37 38 #include "MediaKeySession.h" 38 39 #include "SharedBuffer.h" … … 55 56 // https://w3c.github.io/encrypted-media/#dom-mediakeys-setservercertificate 56 57 // W3C Editor's Draft 09 November 2016 58 LOG(EME, "EME - check if a new session can be created"); 57 59 58 60 // When this method is invoked, the user agent must run the following steps: -
trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp
r227895 r237493 35 35 #include "Document.h" 36 36 #include "JSMediaKeySystemAccess.h" 37 #include "Logging.h" 37 38 38 39 namespace WebCore { … … 44 45 // https://w3c.github.io/encrypted-media/#dom-navigator-requestmediakeysystemaccess 45 46 // W3C Editor's Draft 09 November 2016 47 LOG(EME, "EME - request media key system access for %s", keySystem.utf8().data()); 46 48 47 49 // When this method is invoked, the user agent must run the following steps: … … 61 63 // String comparison is case-sensitive. 62 64 if (!CDM::supportsKeySystem(keySystem)) { 65 LOG(EME, "EME - %s is not supported", keySystem.utf8().data()); 63 66 promise->reject(NotSupportedError); 64 67 return; -
trunk/Source/WebCore/platform/Logging.h
r236954 r237493 47 47 M(DOMTimers) \ 48 48 M(Editing) \ 49 M(EME) \ 49 50 M(Events) \ 50 51 M(FileAPI) \
Note:
See TracChangeset
for help on using the changeset viewer.