Changeset 217180 in webkit
- Timestamp:
- May 19, 2017 6:59:16 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r217176 r217180 1 2017-05-19 Youenn Fablet <youenn@apple.com> 2 3 Add RTCPeerConnection connection state change logging 4 https://bugs.webkit.org/show_bug.cgi?id=172314 5 6 Reviewed by Eric Carlson. 7 8 No change of behavior. 9 Adding some release logging of connection state changes. 10 11 * Modules/mediastream/RTCPeerConnection.cpp: 12 (WebCore::rtcIceGatheringStateToString): 13 (WebCore::RTCPeerConnection::updateIceGatheringState): 14 (WebCore::rtcIceConnectionStateToString): 15 (WebCore::RTCPeerConnection::updateIceConnectionState): 16 1 17 2017-05-19 Jeremy Jones <jeremyj@apple.com> 2 18 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r217082 r217180 445 445 } 446 446 447 #if !RELEASE_LOG_DISABLED 448 static inline const char* rtcIceGatheringStateToString(RTCIceGatheringState newState) 449 { 450 switch (newState) { 451 case RTCIceGatheringState::New: 452 return "new"; 453 case RTCIceGatheringState::Gathering: 454 return "gathering"; 455 case RTCIceGatheringState::Complete: 456 return "complete"; 457 } 458 } 459 #endif 460 447 461 void RTCPeerConnection::updateIceGatheringState(RTCIceGatheringState newState) 448 462 { 463 RELEASE_LOG(WebRTC, "New ICE gathering state: %s\n", rtcIceGatheringStateToString(newState)); 464 449 465 scriptExecutionContext()->postTask([protectedThis = makeRef(*this), newState](ScriptExecutionContext&) { 450 466 if (protectedThis->isClosed() || protectedThis->m_iceGatheringState == newState) … … 457 473 } 458 474 475 #if !RELEASE_LOG_DISABLED 476 static inline const char* rtcIceConnectionStateToString(RTCIceConnectionState newState) 477 { 478 switch (newState) { 479 case RTCIceConnectionState::New: 480 return "new"; 481 case RTCIceConnectionState::Checking: 482 return "checking"; 483 case RTCIceConnectionState::Connected: 484 return "connected"; 485 case RTCIceConnectionState::Completed: 486 return "completed"; 487 case RTCIceConnectionState::Failed: 488 return "failed"; 489 case RTCIceConnectionState::Disconnected: 490 return "disconnected"; 491 case RTCIceConnectionState::Closed: 492 return "closed"; 493 } 494 } 495 #endif 496 459 497 void RTCPeerConnection::updateIceConnectionState(RTCIceConnectionState newState) 460 498 { 499 RELEASE_LOG(WebRTC, "New ICE connection state: %s\n", rtcIceConnectionStateToString(newState)); 500 461 501 scriptExecutionContext()->postTask([protectedThis = makeRef(*this), newState](ScriptExecutionContext&) { 462 502 if (protectedThis->isClosed() || protectedThis->m_iceConnectionState == newState)
Note: See TracChangeset
for help on using the changeset viewer.